Revision 1a290aea qemu-thread-win32.c
b/qemu-thread-win32.c | ||
---|---|---|
33 | 33 |
InitializeCriticalSection(&mutex->lock); |
34 | 34 |
} |
35 | 35 |
|
36 |
void qemu_mutex_destroy(QemuMutex *mutex) |
|
37 |
{ |
|
38 |
assert(mutex->owner == 0); |
|
39 |
DeleteCriticalSection(&mutex->lock); |
|
40 |
} |
|
41 |
|
|
36 | 42 |
void qemu_mutex_lock(QemuMutex *mutex) |
37 | 43 |
{ |
38 | 44 |
EnterCriticalSection(&mutex->lock); |
... | ... | |
80 | 86 |
} |
81 | 87 |
} |
82 | 88 |
|
89 |
void qemu_cond_destroy(QemuCond *cond) |
|
90 |
{ |
|
91 |
BOOL result; |
|
92 |
result = CloseHandle(cond->continue_event); |
|
93 |
if (!result) { |
|
94 |
error_exit(GetLastError(), __func__); |
|
95 |
} |
|
96 |
cond->continue_event = 0; |
|
97 |
result = CloseHandle(cond->sema); |
|
98 |
if (!result) { |
|
99 |
error_exit(GetLastError(), __func__); |
|
100 |
} |
|
101 |
cond->sema = 0; |
|
102 |
} |
|
103 |
|
|
83 | 104 |
void qemu_cond_signal(QemuCond *cond) |
84 | 105 |
{ |
85 | 106 |
DWORD result; |
Also available in: Unified diff