]> git.ipfire.org Git - thirdparty/qemu.git/commit
qemu-thread: Add qemu_cond_timedwait
authorYury Kotov <yury-kotov@yandex-team.ru>
Mon, 9 Sep 2019 13:13:33 +0000 (16:13 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 16 Sep 2019 15:13:06 +0000 (17:13 +0200)
commit3dcc9c6ec4ea60fd1464b35aa82199483f24ba75
treea5783dd0cfda9df2e82aa63a3be577a913e86ec1
parent7a3df11c2a647cf889f6ede8b7d5f81438bb5cc9
qemu-thread: Add qemu_cond_timedwait

The new function is needed to implement conditional sleep for CPU
throttling. It's possible to reuse qemu_sem_timedwait, but it's more
difficult than just add qemu_cond_timedwait.

Also moved compute_abs_deadline function up the code to reuse it in
qemu_cond_timedwait_impl win32.

Signed-off-by: Yury Kotov <yury-kotov@yandex-team.ru>
Message-Id: <20190909131335.16848-2-yury-kotov@yandex-team.ru>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/qemu/thread.h
util/qemu-thread-posix.c
util/qemu-thread-win32.c
util/qsp.c