Statistics
| Branch: | Revision:

root / qemu-thread-posix.c @ 8fc94e5a

History | View | Annotate | Download (6.8 kB)

# Date Author Comment
a795ef8d 12/29/2012 02:27 pm Brad Smith

Fix semaphores fallback code

As reported in bug 1087114 the semaphores fallback code is broken which
results in QEMU crashing and making QEMU unusable.

This patch is from Paolo.

This needs to be back ported to the 1.3 stable tree as well.

Signed-off-by: Paolo Bonzini <>...

927fa909 12/28/2012 06:11 pm Brad Smith

Disable semaphores fallback code for OpenBSD

Disable the semaphores fallback code for OpenBSD as modern OpenBSD
releases now have sem_timedwait().

Signed-off-by: Brad Smith <>
Signed-off-by: Blue Swirl <>

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

c166cb72 11/02/2012 08:07 pm Paolo Bonzini

semaphore: implement fallback counting semaphores with mutex+condvar

OpenBSD and Darwin do not have sem_timedwait. Implement a fallback
for them.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

38b14db3 10/31/2012 10:45 am Paolo Bonzini

qemu-thread: add QemuSemaphore

The new thread pool will use semaphores instead of condition
variables, because QemuCond does not have qemu_cond_timedwait.
(I also like it more this way).

Signed-off-by: Paolo Bonzini <>

2d797b65 08/02/2012 07:11 pm Andreas Färber

qemu-thread: Let qemu_thread_is_self() return bool

qemu_cpu_is_self(), passing the return value through, will later be
adapted to return bool as well.

Signed-off-by: Andreas Färber <>
Reviewed-by: Stefan Weil <>

cf218714 12/13/2011 01:06 am Jan Kiszka

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 will
conform to.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Paolo Bonzini <>...

8763046b 12/13/2011 01:06 am Jan Kiszka

qemu-thread: implement joinable threads for POSIX

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...

53380ac3 09/21/2011 12:50 pm Jan Kiszka

Abort on thread layer errors

Makes it easier to catch the bug in gdb as there is no need to set an
explicit breakpoint.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Stefan Hajnoczi <>

44bc10d5 03/19/2011 10:30 am Blue Swirl

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 <>
Signed-off-by: Blue Swirl <>

cc015e9a 03/13/2011 04:44 pm Paolo Bonzini

add Win32 IPI service

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Blue Swirl <>

9257d46d 03/13/2011 04:44 pm Paolo Bonzini

add win32 qemu-thread implementation

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 <>
Signed-off-by: Blue Swirl <>

89b48b56 03/13/2011 04:44 pm Paolo Bonzini

add assertions on the owner of a QemuMutex

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....