summaryrefslogtreecommitdiff
path: root/util/qemu-thread-win32.c
AgeCommit message (Collapse)AuthorFilesLines
2014-03-09Add a 'name' parameter to qemu_thread_createDr. David Alan Gilbert1-1/+1
If enabled, set the thread name at creation (on GNU systems with pthread_set_np) Fix up all the callers with a thread name Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2014-03-09Add 'debug-threads' suboption to --nameDr. David Alan Gilbert1-0/+8
Add flag storage to qemu-thread-* to store the namethreads flag Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2013-10-17qemu-thread: add QemuEventPaolo Bonzini1-0/+26
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-01-12build: move libqemuutil.a components to util/Paolo Bonzini1-0/+359
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>