util: Use real functions for thread-posix QemuRecMutex

Move the declarations from thread-win32.h into thread.h
and remove the macro redirection from thread-posix.h.
This will be required by following cleanups.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210614233143.1221879-4-richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Richard Henderson 2021-06-14 16:31:38 -07:00 committed by Paolo Bonzini
parent 52a8071579
commit 5d63bd5aad
4 changed files with 26 additions and 13 deletions

View file

@ -124,6 +124,26 @@ void qemu_rec_mutex_init(QemuRecMutex *mutex)
mutex->initialized = true;
}
void qemu_rec_mutex_destroy(QemuRecMutex *mutex)
{
qemu_mutex_destroy(mutex);
}
void qemu_rec_mutex_lock_impl(QemuRecMutex *mutex, const char *file, int line)
{
qemu_mutex_lock_impl(mutex, file, line);
}
int qemu_rec_mutex_trylock_impl(QemuRecMutex *mutex, const char *file, int line)
{
return qemu_mutex_trylock_impl(mutex, file, line);
}
void qemu_rec_mutex_unlock(QemuRecMutex *mutex)
{
qemu_mutex_unlock(mutex);
}
void qemu_cond_init(QemuCond *cond)
{
int err;