Displaying 2 results from an estimated 2 matches for "output_avail".
2005 Aug 04
0
[PATCH 5/11] Fix bug where watch messages didn''t go out to domains, causing them to get stuck.
...dr.msg.len && !conn->domain)
return true;
}
diff -r d4ab9ac93104 -r ba5d5bd28edf tools/xenstore/xs_test.c
--- a/tools/xenstore/xs_test.c Thu Aug 4 10:34:26 2005
+++ b/tools/xenstore/xs_test.c Thu Aug 4 10:43:03 2005
@@ -80,6 +80,14 @@
return buf + h->read;
}
+static int output_avail(struct ringbuf_head *out)
+{
+ unsigned int avail;
+
+ get_output_chunk(out, out->buf, &avail);
+ return avail != 0;
+}
+
static void update_output_chunk(struct ringbuf_head *h, uint32_t len)
{
h->write += len;
@@ -99,10 +107,12 @@
void *data, unsigned int len)
{
unsigned in...
2005 Oct 12
1
[PATCH] Restore, comment, correct memory barriers in xenstored.
...067b9aacb6c2 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c Wed Oct 12 09:11:35 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c Thu Oct 13 01:18:26 2005
@@ -130,7 +130,7 @@
wait_event_interruptible(xb_waitq, output_avail(out));
- mb();
+ /* Make local copy of header to check for sanity. */
h = *out;
if (!check_buffer(&h))
return -EIO;
@@ -140,10 +140,20 @@
continue;
if (avail > len)
avail = len;
+
+ /* Make sure we read header before we write data
+ * (implied by data-dependency,...