mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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>
This commit is contained in:
1 parent
a93d14138b
commit
4a4ad39633
1 file changed
+6
@@ -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)
|
||||
|
||||