thread-posix: optimize qemu_sem_timedwait with zero timeout
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 21 Feb 2022 11:46:32 +0000 (12:46 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 6 Apr 2022 12:31:56 +0000 (14:31 +0200)
commit8ab3026489eafa9da07c09f1929593fe0db5e380
tree8bfe3578de68aeea179e7a5878c71501d2ed298c
parenta0d45db85496c195ab5f3f2ced742fc93d9709c2
thread-posix: optimize qemu_sem_timedwait with zero timeout

In this case there is no need to call pthread_cond_timedwait; the
function is just a trywait and waiting on the condition variable would
always time out.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
util/qemu-thread-posix.c