diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2014-10-24 10:51:05 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2014-11-25 14:57:23 +0100 |
commit | 697f3214fd16adcd524456003619f7f44ddd031b (patch) | |
tree | 2028e1948861200ccf1eccac111652d414aa6bb0 /server/spice.h | |
parent | 1ac4dfb3170bd970c90ff970e9f93775867b83e5 (diff) | |
download | spice-697f3214fd16adcd524456003619f7f44ddd031b.tar.gz spice-697f3214fd16adcd524456003619f7f44ddd031b.tar.xz spice-697f3214fd16adcd524456003619f7f44ddd031b.zip |
chardev: remove write polling
In an effort to reduce the wakeups per second, get rid of the
"write_to_dev" timer when the implementation supports
SPICE_CHAR_DEVICE_NOTIFY_WRITABLE.
When this flag is set, the frontend instance is responsible for calling
spice_char_device_wakeup() when the device is ready to perform IO.
Related to:
https://bugzilla.redhat.com/show_bug.cgi?id=912763
Diffstat (limited to 'server/spice.h')
-rw-r--r-- | server/spice.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/server/spice.h b/server/spice.h index 58700d14..bd5bba89 100644 --- a/server/spice.h +++ b/server/spice.h @@ -24,7 +24,7 @@ #include <spice/vd_agent.h> #include <spice/macros.h> -#define SPICE_SERVER_VERSION 0x000c05 /* release 0.12.5 */ +#define SPICE_SERVER_VERSION 0x000c06 /* release 0.12.6 */ #ifdef SPICE_SERVER_INTERNAL #undef SPICE_GNUC_DEPRECATED @@ -402,11 +402,15 @@ void spice_server_set_record_rate(SpiceRecordInstance *sin, uint32_t frequen #define SPICE_INTERFACE_CHAR_DEVICE "char_device" #define SPICE_INTERFACE_CHAR_DEVICE_MAJOR 1 -#define SPICE_INTERFACE_CHAR_DEVICE_MINOR 2 +#define SPICE_INTERFACE_CHAR_DEVICE_MINOR 3 typedef struct SpiceCharDeviceInterface SpiceCharDeviceInterface; typedef struct SpiceCharDeviceInstance SpiceCharDeviceInstance; typedef struct SpiceCharDeviceState SpiceCharDeviceState; +typedef enum { + SPICE_CHAR_DEVICE_NOTIFY_WRITABLE = 1 << 0, +} spice_char_device_flags; + struct SpiceCharDeviceInterface { SpiceBaseInterface base; @@ -414,6 +418,7 @@ struct SpiceCharDeviceInterface { int (*write)(SpiceCharDeviceInstance *sin, const uint8_t *buf, int len); int (*read)(SpiceCharDeviceInstance *sin, uint8_t *buf, int len); void (*event)(SpiceCharDeviceInstance *sin, uint8_t event); + spice_char_device_flags flags; }; struct SpiceCharDeviceInstance { |