Message ID | 20221011224154.644379-2-peterx@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | qemu-thread: Strict unlock check | expand |
diff --git a/util/qemu-thread-posix.c b/util/qemu-thread-posix.c index ac1d56e673..5840f6e6f5 100644 --- a/util/qemu-thread-posix.c +++ b/util/qemu-thread-posix.c @@ -229,9 +229,9 @@ qemu_cond_timedwait_ts(QemuCond *cond, QemuMutex *mutex, struct timespec *ts, int err; assert(cond->initialized); - trace_qemu_mutex_unlock(mutex, file, line); + qemu_mutex_pre_unlock(mutex, file, line); err = pthread_cond_timedwait(&cond->cond, &mutex->lock, ts); - trace_qemu_mutex_locked(mutex, file, line); + qemu_mutex_post_lock(mutex, file, line); if (err && err != ETIMEDOUT) { error_exit(err, __func__); }
The new _timedwait() version of qemu cond/mutex doesn't trigger the DEBUG_MUTEX paths; enable it too. Cc: Yury Kotov <yury-kotov@yandex-team.ru> Signed-off-by: Peter Xu <peterx@redhat.com> --- util/qemu-thread-posix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)