summaryrefslogtreecommitdiffstats
path: root/server/char_device.c
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2012-06-25 09:34:57 +0300
committerYonit Halperin <yhalperi@redhat.com>2012-07-03 14:13:43 +0300
commitbf91bdce5cb5b391b9d3f86900845831da80a5c5 (patch)
treef5fa2d5e524e54846620c5ac70fa2912741bf61d /server/char_device.c
parent8bb444ec7ac3a64058138b24241149ae116653a4 (diff)
downloadspice-bf91bdce5cb5b391b9d3f86900845831da80a5c5.tar.gz
spice-bf91bdce5cb5b391b9d3f86900845831da80a5c5.tar.xz
spice-bf91bdce5cb5b391b9d3f86900845831da80a5c5.zip
char_device: move SpiceCharDeviceState from the header
In addition, I also removed the no longer used wakeup callback
Diffstat (limited to 'server/char_device.c')
-rw-r--r--server/char_device.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/server/char_device.c b/server/char_device.c
index f4939566..e87c0296 100644
--- a/server/char_device.c
+++ b/server/char_device.c
@@ -43,6 +43,29 @@ struct SpiceCharDeviceClientState {
uint32_t max_send_queue_size;
};
+struct SpiceCharDeviceState {
+ int running;
+ uint32_t refs;
+
+ Ring write_queue;
+ Ring write_bufs_pool;
+ SpiceCharDeviceWriteBuffer *cur_write_buf;
+ uint8_t *cur_write_buf_pos;
+ SpiceTimer *write_to_dev_timer;
+ uint64_t num_self_tokens;
+
+ Ring clients; /* list of SpiceCharDeviceClientState */
+ uint32_t num_clients;
+
+ uint64_t client_tokens_interval; /* frequency of returning tokens to the client */
+ SpiceCharDeviceInstance *sin;
+
+ int during_read_from_device;
+
+ SpiceCharDeviceCallbacks cbs;
+ void *opaque;
+};
+
enum {
WRITE_BUFFER_ORIGIN_NONE,
WRITE_BUFFER_ORIGIN_CLIENT,