diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-10-05 16:32:07 +0100 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-10-05 16:32:07 +0100 |
commit | 4a4ad39633edaebc4cfe4bd5562be1d80b4e3c55 (patch) | |
tree | 466e1f09a049de5efa9ce636e78e60fbde99e9d5 /tools | |
parent | a93d14138bd6424ddd78e1a397b3984c123180d4 (diff) | |
download | xen-4a4ad39633edaebc4cfe4bd5562be1d80b4e3c55.tar.gz xen-4a4ad39633edaebc4cfe4bd5562be1d80b4e3c55.tar.bz2 xen-4a4ad39633edaebc4cfe4bd5562be1d80b4e3c55.zip |
Send event-channel notification from console daemon
to guest console driver when the output ring is
emptied. This can be used to kick transmission of
more characters without needing to poll.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/console/daemon/io.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c index e4739d977c..a841af1c95 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -86,8 +86,11 @@ static void buffer_append(struct domain *dom) struct ring_head *ring = (struct ring_head *)dom->page; size_t size; u32 oldcons; + int notify = 0; while ((size = ring->prod - ring->cons) != 0) { + notify = 1; + if ((buffer->capacity - buffer->size) < size) { buffer->capacity += (size + 1024); buffer->data = realloc(buffer->data, buffer->capacity); @@ -115,6 +118,9 @@ static void buffer_append(struct domain *dom) buffer->capacity = buffer->max_capacity; } } + + if (notify) + xc_evtchn_send(xc, dom->local_port); } static bool buffer_empty(struct buffer *buffer) |