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/spice.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/spice.h')
-rw-r--r-- | server/spice.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/server/spice.h b/server/spice.h index 0b82bb78..c7f0a6ef 100644 --- a/server/spice.h +++ b/server/spice.h @@ -20,6 +20,7 @@ #include <stdint.h> #include <sys/socket.h> +#include <spice/qxl_dev.h> #define SPICE_SERVER_VERSION 0x000900 /* release 0.9.0 */ @@ -143,6 +144,15 @@ void spice_qxl_reset_image_cache(QXLInstance *instance); void spice_qxl_reset_cursor(QXLInstance *instance); void spice_qxl_destroy_surface_wait(QXLInstance *instance, uint32_t surface_id); void spice_qxl_loadvm_commands(QXLInstance *instance, struct QXLCommandExt *ext, uint32_t count); +/* async versions of commands. when complete spice calls async_complete */ +void spice_qxl_update_area_async(QXLInstance *instance, uint32_t surface_id, QXLRect *qxl_area, + uint32_t clear_dirty_region, uint64_t cookie); +void spice_qxl_add_memslot_async(QXLInstance *instance, QXLDevMemSlot *slot, uint64_t cookie); +void spice_qxl_destroy_surfaces_async(QXLInstance *instance, uint64_t cookie); +void spice_qxl_destroy_primary_surface_async(QXLInstance *instance, uint32_t surface_id, uint64_t cookie); +void spice_qxl_create_primary_surface_async(QXLInstance *instance, uint32_t surface_id, + QXLDevSurfaceCreate *surface, uint64_t cookie); +void spice_qxl_destroy_surface_async(QXLInstance *instance, uint32_t surface_id, uint64_t cookie); typedef struct QXLDrawArea { uint8_t *buf; @@ -212,6 +222,7 @@ struct QXLInterface { int (*req_cursor_notification)(QXLInstance *qin); void (*notify_update)(QXLInstance *qin, uint32_t update_id); int (*flush_resources)(QXLInstance *qin); + void (*async_complete)(QXLInstance *qin, uint64_t cookie); }; struct QXLInstance { |