diff options
author | Alon Levy <alevy@redhat.com> | 2011-07-06 02:12:19 +0200 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2011-07-20 16:00:19 +0300 |
commit | 096f49afbf4e83ccee80f58479b3ff05bd355660 (patch) | |
tree | 7f8df1ea290e3ed23b0a34a82ae0f22aaf8cbc38 /server/red_worker.h | |
parent | 4db8f5efdda91acf3b94c6c104d48438f6f4e85d (diff) | |
download | spice-096f49afbf4e83ccee80f58479b3ff05bd355660.tar.gz spice-096f49afbf4e83ccee80f58479b3ff05bd355660.tar.xz spice-096f49afbf4e83ccee80f58479b3ff05bd355660.zip |
server: add async io support
The new _ASYNC io's in qxl_dev listed at the end get six new api
functions, and an additional callback function "async_complete". When
the async version of a specific io is used, completion is notified by
calling async_complete, and no READY message is written or expected by
the dispatcher.
update_area has been changed to push QXLRects to the worker thread, where
the conversion to SpiceRect takes place.
A cookie has been added to each async call to QXLWorker, and is passed back via
async_complete.
Added api:
QXLWorker:
update_area_async
add_memslot_async
destroy_surfaces_async
destroy_primary_surface_async
create_primary_surface_async
destroy_surface_wait_async
QXLInterface:
async_complete
Diffstat (limited to 'server/red_worker.h')
-rw-r--r-- | server/red_worker.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/server/red_worker.h b/server/red_worker.h index b4e2ed2e..604437bf 100644 --- a/server/red_worker.h +++ b/server/red_worker.h @@ -70,6 +70,13 @@ enum { RED_WORKER_MESSAGE_RESET_IMAGE_CACHE, RED_WORKER_MESSAGE_DESTROY_SURFACE_WAIT, RED_WORKER_MESSAGE_LOADVM_COMMANDS, + /* async commands */ + RED_WORKER_MESSAGE_UPDATE_ASYNC, + RED_WORKER_MESSAGE_ADD_MEMSLOT_ASYNC, + RED_WORKER_MESSAGE_DESTROY_SURFACES_ASYNC, + RED_WORKER_MESSAGE_CREATE_PRIMARY_SURFACE_ASYNC, + RED_WORKER_MESSAGE_DESTROY_PRIMARY_SURFACE_ASYNC, + RED_WORKER_MESSAGE_DESTROY_SURFACE_WAIT_ASYNC, }; typedef uint32_t RedWorkerMessage; @@ -83,6 +90,8 @@ enum { RED_RENDERER_OGL_PIXMAP, }; +typedef struct RedDispatcher RedDispatcher; + typedef struct WorkerInitData { struct QXLInstance *qxl; int id; @@ -100,6 +109,7 @@ typedef struct WorkerInitData { uint8_t memslot_id_bits; uint8_t internal_groupslot_id; uint32_t n_surfaces; + RedDispatcher *dispatcher; } WorkerInitData; void *red_worker_main(void *arg); |