OSDN Git Service

thread-posix: implement Semaphore with QemuCond and QemuMutex
authorLongpeng(Mike) <longpeng2@huawei.com>
Tue, 22 Feb 2022 09:05:06 +0000 (17:05 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 6 Apr 2022 12:31:56 +0000 (14:31 +0200)
commita0d45db85496c195ab5f3f2ced742fc93d9709c2
tree8e012af1385b943a3887bc62d29b8e4b880b96f2
parent657ac98b58cee10e99c9d402bda4555fd0ec4d1f
thread-posix: implement Semaphore with QemuCond and QemuMutex

Now that QemuSemaphore is implemented through pthread_cond_t only, we can use
QemuCond and QemuMutex to make the code smaller.  Features such as mutex
tracing and CLOCK_MONOTONIC timedwait are supported in qemu-sem naturally.

Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com>
Message-Id: <20220222090507.2028-4-longpeng2@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/qemu/thread-posix.h
util/qemu-thread-posix.c