Re: [Qemu-devel] [PATCH v4 3/4] qemu-thread: add QemuEvent

2013-09-22 Thread Jan Kiszka
On 2013-09-22 10:11, Liu Ping Fan 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 threads: > > f

[Qemu-devel] [PATCH v4 3/4] qemu-thread: add QemuEvent

2013-09-22 Thread Liu Ping Fan
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