Re: [Qemu-devel] [RFC PATCH 03/13] qemu-threads: add QemuEvent

2011-08-17 Thread Blue Swirl
On Mon, Aug 15, 2011 at 9:08 PM, Paolo Bonzini wrote: > This emulates Win32 manual-reset events using futexes or conditional > variables.  Typical ways to use them are with multi-producer, > single-consumer data structures, to test for a complex condition whose > elements come from different threa

[Qemu-devel] [RFC PATCH 03/13] qemu-threads: add QemuEvent

2011-08-15 Thread Paolo Bonzini
This emulates Win32 manual-reset events using futexes or conditional variables. Typical ways to use them are with multi-producer, single-consumer data structures, to test for a complex condition whose elements come from different threads: for (;;) { qemu_event_reset(ev); ... t