search for: update_output_chunk

Displaying 2 results from an estimated 2 matches for "update_output_chunk".

2005 Oct 12
1
[PATCH] Restore, comment, correct memory barriers in xenstored.
...len) avail = len; + + /* Make sure we read header before we write data + * (implied by data-dependency, but let''s play safe). */ + mb(); + memcpy(dst, data, avail); data += avail; len -= avail; + + /* Other side must not see new header until data is there. */ + wmb(); update_output_chunk(out, avail); + + /* This implies mb() before other side sees interrupt. */ notify_remote_via_evtchn(xen_start_info->store_evtchn); } while (len != 0); @@ -171,7 +181,6 @@ wait_event_interruptible(xb_waitq, xs_input_avail()); - mb(); h = *in; if (!check_buffer(&h)) r...
2005 Aug 04
0
[PATCH 5/11] Fix bug where watch messages didn''t go out to domains, causing them to get stuck.
...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 int avail; + int was_full; if (!check_buffer(in)) barf("Corrupt buffer"); + was_full = !output_avail(in); while (len) { const void *src = ge...