Revision 313b1d69 qemu-thread.c
b/qemu-thread.c | ||
---|---|---|
34 | 34 |
error_exit(err, __func__); |
35 | 35 |
} |
36 | 36 |
|
37 |
void qemu_mutex_destroy(QemuMutex *mutex) |
|
38 |
{ |
|
39 |
int err; |
|
40 |
|
|
41 |
err = pthread_mutex_destroy(&mutex->lock); |
|
42 |
if (err) |
|
43 |
error_exit(err, __func__); |
|
44 |
} |
|
45 |
|
|
37 | 46 |
void qemu_mutex_lock(QemuMutex *mutex) |
38 | 47 |
{ |
39 | 48 |
int err; |
... | ... | |
90 | 99 |
error_exit(err, __func__); |
91 | 100 |
} |
92 | 101 |
|
102 |
void qemu_cond_destroy(QemuCond *cond) |
|
103 |
{ |
|
104 |
int err; |
|
105 |
|
|
106 |
err = pthread_cond_destroy(&cond->cond); |
|
107 |
if (err) |
|
108 |
error_exit(err, __func__); |
|
109 |
} |
|
110 |
|
|
93 | 111 |
void qemu_cond_signal(QemuCond *cond) |
94 | 112 |
{ |
95 | 113 |
int err; |
... | ... | |
168 | 186 |
return pthread_equal(thread1->thread, thread2->thread); |
169 | 187 |
} |
170 | 188 |
|
189 |
void qemu_thread_exit(void *retval) |
|
190 |
{ |
|
191 |
pthread_exit(retval); |
|
192 |
} |
Also available in: Unified diff