Re: [Qemu-devel] [PATCH 02/12] qemu-thread: add QemuEvent

2013-05-16 Thread Paolo Bonzini
Il 16/05/2013 12:15, Stefan Hajnoczi ha scritto: > On Wed, May 15, 2013 at 05:48:47PM +0200, 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

Re: [Qemu-devel] [PATCH 02/12] qemu-thread: add QemuEvent

2013-05-16 Thread Stefan Hajnoczi
On Wed, May 15, 2013 at 05:48:47PM +0200, 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 differe

[Qemu-devel] [PATCH 02/12] qemu-thread: add QemuEvent

2013-05-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