aboutsummaryrefslogtreecommitdiffstats
path: root/qemu-thread-posix.c
AgeCommit message (Collapse)AuthorFilesLines
2011-12-12qemu-thread: implement joinable threads for POSIXJan Kiszka1-2/+26
Allow to control if a QEMU thread is created joinable or not. Make it not joinable by default to avoid that we keep the associated resources around when terminating a thread without joining it (what we couldn't do so far for obvious reasons). The audio subsystem will need the join feature when converting it to QEMU threading/locking abstractions, so provide that service. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-12qemu-thread: add API for joinable threadsJan Kiszka1-3/+4
Split from Jan's original qemu-thread-posix.c patch. No semantic change, just introduce the new API that POSIX and Win32 implementations will conform to. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-09-21Abort on thread layer errorsJan Kiszka1-1/+1
Makes it easier to catch the bug in gdb as there is no need to set an explicit breakpoint. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-03-19qemu-thread: delete unused functionsBlue Swirl1-38/+0
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>
2011-03-13add Win32 IPI servicePaolo Bonzini1-9/+0
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13add assertions on the owner of a QemuMutexPaolo Bonzini1-1/+5
These are already present in the Win32 implementation, add them to the pthread wrappers as well. Use PTHREAD_MUTEX_ERRORCHECK for mutex operations. Later we'll add tracking of the owner for cond_signal/broadcast. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13add win32 qemu-thread implementationPaolo Bonzini1-0/+192
For now, qemu_cond_timedwait and qemu_mutex_timedlock are left as POSIX-only functions. They can be removed later, once the patches that remove their uses are in. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>