As a point of history, the original code only used sem_t. The pthreads
based fallback was introduced by Paolo in
commit c166cb72f1676855816340666c3b618beef4b976
Author: Paolo Bonzini <pbonzini@redhat.com>
Date: Fri Nov 2 15:43:21 2012 +0100
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 <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
I'm going to assume this fallback impl is less efficient than the
native sem_t impl as the reason for leaving the original impl, or
maybe Paolo just want to risk accidental bugs by removing the
existing usage ?