qemu-e2k/util
Paolo Bonzini c7c4d063f5 qemu-thread: add QemuEvent
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);
        ... test complex condition ...
        if (condition is true) {
            break;
        }
        qemu_event_wait(ev);
    }

Or more efficiently (but with some duplication):

    ... evaluate condition ...
    while (!condition) {
        qemu_event_reset(ev);
        ... evaluate condition ...
        if (!condition) {
            qemu_event_wait(ev);
            ... evaluate condition ...
        }
    }

QemuEvent provides a very fast userspace path in the common case when
no other thread is waiting, or the event is not changing state.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-10-17 17:30:55 +02:00
..
acl.c
aes.c
bitmap.c
bitops.c
cache-utils.c
compatfd.c compatfd: switch to QemuThread 2013-10-17 17:24:14 +02:00
crc32c.c
cutils.c
envlist.c
error.c error: Add error_set_win32 and error_setg_win32 2013-09-09 14:17:57 -05:00
event_notifier-posix.c
event_notifier-win32.c
fifo8.c
hbitmap.c
hexdump.c
host-utils.c
iov.c iov: avoid "orig_len may be used unitialized" warning 2013-09-20 20:09:24 +04:00
Makefile.objs throttle: Add a new throttling API implementing continuous leaky bucket. 2013-09-06 15:25:07 +02:00
module.c
notify.c
osdep.c osdep: warn if open(O_DIRECT) on fails with EINVAL 2013-09-18 15:34:51 +02:00
oslib-posix.c util: add socket_set_fast_reuse function which will replace setting SO_REUSEADDR 2013-10-02 19:20:31 +02:00
oslib-win32.c util: add socket_set_fast_reuse function which will replace setting SO_REUSEADDR 2013-10-02 19:20:31 +02:00
path.c util/path: Fix type which is longer than 8 bit for MinGW 2013-10-05 14:01:47 +04:00
qemu-config.c
qemu-error.c
qemu-openpty.c
qemu-option.c blockdev: Separate ID generation from DriveInfo creation 2013-10-11 16:50:01 +02:00
qemu-progress.c
qemu-sockets.c util: call socket_set_fast_reuse instead of setting SO_REUSEADDR 2013-10-02 19:20:31 +02:00
qemu-thread-posix.c qemu-thread: add QemuEvent 2013-10-17 17:30:55 +02:00
qemu-thread-win32.c qemu-thread: add QemuEvent 2013-10-17 17:30:55 +02:00
qemu-timer-common.c
throttle.c throttle: Add a new throttling API implementing continuous leaky bucket. 2013-09-06 15:25:07 +02:00
unicode.c
uri.c