diff options
Diffstat (limited to 'include/qemu')
| -rw-r--r-- | include/qemu/main-loop.h | 2 | ||||
| -rw-r--r-- | include/qemu/thread-posix.h | 4 | ||||
| -rw-r--r-- | include/qemu/thread-win32.h | 5 |
3 files changed, 10 insertions, 1 deletions
diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h index d7e24af78d..6b4b60bf6d 100644 --- a/include/qemu/main-loop.h +++ b/include/qemu/main-loop.h @@ -79,7 +79,7 @@ int qemu_init_main_loop(Error **errp); * * @nonblocking: Whether the caller should block until an event occurs. */ -int main_loop_wait(int nonblocking); +void main_loop_wait(int nonblocking); /** * qemu_get_aio_context: Return the main loop's AioContext diff --git a/include/qemu/thread-posix.h b/include/qemu/thread-posix.h index 09d1e15728..e5e3a0ff97 100644 --- a/include/qemu/thread-posix.h +++ b/include/qemu/thread-posix.h @@ -12,10 +12,12 @@ typedef QemuMutex QemuRecMutex; struct QemuMutex { pthread_mutex_t lock; + bool initialized; }; struct QemuCond { pthread_cond_t cond; + bool initialized; }; struct QemuSemaphore { @@ -26,6 +28,7 @@ struct QemuSemaphore { #else sem_t sem; #endif + bool initialized; }; struct QemuEvent { @@ -34,6 +37,7 @@ struct QemuEvent { pthread_cond_t cond; #endif unsigned value; + bool initialized; }; struct QemuThread { diff --git a/include/qemu/thread-win32.h b/include/qemu/thread-win32.h index 4c4a261cf4..3a05e3b3aa 100644 --- a/include/qemu/thread-win32.h +++ b/include/qemu/thread-win32.h @@ -5,11 +5,13 @@ struct QemuMutex { SRWLOCK lock; + bool initialized; }; typedef struct QemuRecMutex QemuRecMutex; struct QemuRecMutex { CRITICAL_SECTION lock; + bool initialized; }; void qemu_rec_mutex_destroy(QemuRecMutex *mutex); @@ -19,15 +21,18 @@ void qemu_rec_mutex_unlock(QemuRecMutex *mutex); struct QemuCond { CONDITION_VARIABLE var; + bool initialized; }; struct QemuSemaphore { HANDLE sema; + bool initialized; }; struct QemuEvent { int value; HANDLE event; + bool initialized; }; typedef struct QemuThreadData QemuThreadData; |