mirror of https://github.com/xemu-project/xemu.git
w32: Add missing functions qemu_mutex_destroy, qemu_cond_destroy
These functions were missing in commit
9257d46d55
.
Both functions are needed for compilations with
configuration --enable-vnc-thread.
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
ca22a3a375
commit
1a290aea8d
|
@ -33,6 +33,12 @@ void qemu_mutex_init(QemuMutex *mutex)
|
||||||
InitializeCriticalSection(&mutex->lock);
|
InitializeCriticalSection(&mutex->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void qemu_mutex_destroy(QemuMutex *mutex)
|
||||||
|
{
|
||||||
|
assert(mutex->owner == 0);
|
||||||
|
DeleteCriticalSection(&mutex->lock);
|
||||||
|
}
|
||||||
|
|
||||||
void qemu_mutex_lock(QemuMutex *mutex)
|
void qemu_mutex_lock(QemuMutex *mutex)
|
||||||
{
|
{
|
||||||
EnterCriticalSection(&mutex->lock);
|
EnterCriticalSection(&mutex->lock);
|
||||||
|
@ -80,6 +86,21 @@ void qemu_cond_init(QemuCond *cond)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void qemu_cond_destroy(QemuCond *cond)
|
||||||
|
{
|
||||||
|
BOOL result;
|
||||||
|
result = CloseHandle(cond->continue_event);
|
||||||
|
if (!result) {
|
||||||
|
error_exit(GetLastError(), __func__);
|
||||||
|
}
|
||||||
|
cond->continue_event = 0;
|
||||||
|
result = CloseHandle(cond->sema);
|
||||||
|
if (!result) {
|
||||||
|
error_exit(GetLastError(), __func__);
|
||||||
|
}
|
||||||
|
cond->sema = 0;
|
||||||
|
}
|
||||||
|
|
||||||
void qemu_cond_signal(QemuCond *cond)
|
void qemu_cond_signal(QemuCond *cond)
|
||||||
{
|
{
|
||||||
DWORD result;
|
DWORD result;
|
||||||
|
|
Loading…
Reference in New Issue