History | View | Annotate | Download (3.4 kB)
qemu-thread: add API for joinable threads
Split from Jan's original qemu-thread-posix.c patch. No semantic change,just introduce the new API that POSIX and Win32 implementations willconform to.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
qemu-thread: implement joinable threads for POSIX
Allow to control if a QEMU thread is created joinable or not. Make itnot joinable by default to avoid that we keep the associated resourcesaround when terminating a thread without joining it (what we couldn't do...
Abort on thread layer errors
Makes it easier to catch the bug in gdb as there is no need to set anexplicit breakpoint.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
qemu-thread: delete unused functions
qemu_mutex_timedlock() and qemu_cond_timedwait() are no longer used.
Remove them and their helper timespec_add_ms().
Reported-by: François Revol <revol@free.fr>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
add Win32 IPI service
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
add win32 qemu-thread implementation
For now, qemu_cond_timedwait and qemu_mutex_timedlock are left asPOSIX-only functions. They can be removed later, once the patchesthat remove their uses are in.
add assertions on the owner of a QemuMutex
These are already present in the Win32 implementation, add them tothe pthread wrappers as well. Use PTHREAD_MUTEX_ERRORCHECK for mutexoperations. Later we'll add tracking of the owner for cond_signal/broadcast....