semaphore: implement fallback counting semaphores with mutex+condvar
OpenBSD and Darwin do not have sem_timedwait. Implement a fallback for them. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
Showing