]> git.ipfire.org Git - thirdparty/qemu.git/commit - meson.build
thread-posix: use monotonic clock for QemuCond and QemuSemaphore
authorLongpeng(Mike) <longpeng2@huawei.com>
Tue, 22 Feb 2022 09:05:05 +0000 (17:05 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 6 Apr 2022 12:31:56 +0000 (14:31 +0200)
commit657ac98b58cee10e99c9d402bda4555fd0ec4d1f
tree8b26f839c378811d1eacb346f09e464996bd53a4
parentf9fc8932b11f3bcf2a2626f567cb6fdd36a33a94
thread-posix: use monotonic clock for QemuCond and QemuSemaphore

Use CLOCK_MONOTONIC, so the timeout isn't affected by changes to
the system time. It depends on the pthread_condattr_setclock(),
while some systems(e.g. mac os) does not support it, so the behavior
won't change in these systems.

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