summaryrefslogtreecommitdiffstats
path: root/qemu-thread-posix.c
Commit message (Collapse)AuthorAgeFilesLines
* qemu-thread: implement joinable threads for POSIXJan Kiszka2011-12-121-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>
* qemu-thread: add API for joinable threadsJan Kiszka2011-12-121-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>
* Abort on thread layer errorsJan Kiszka2011-09-211-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>
* qemu-thread: delete unused functionsBlue Swirl2011-03-191-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>
* add Win32 IPI servicePaolo Bonzini2011-03-131-9/+0
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* add assertions on the owner of a QemuMutexPaolo Bonzini2011-03-131-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>
* add win32 qemu-thread implementationPaolo Bonzini2011-03-131-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>
OpenPOWER on IntegriCloud