[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Send event-channel notification from console daemon



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 438f1b53682b8b796be5374e5f148f0617829a28
# Parent  072fb38810a60dcfd14b599f0dcdf2eac89a1143
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@xxxxxxxxxxxxx>

diff -r 072fb38810a6 -r 438f1b53682b tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Wed Oct  5 14:15:50 2005
+++ b/tools/console/daemon/io.c Wed Oct  5 15:32:07 2005
@@ -86,8 +86,11 @@
        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 @@
                        buffer->capacity = buffer->max_capacity;
                }
        }
+
+       if (notify)
+               xc_evtchn_send(xc, dom->local_port);
 }
 
 static bool buffer_empty(struct buffer *buffer)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.