diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/qemu/main-loop.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h index 0f4a0fd4b2..bc18ca30e4 100644 --- a/include/qemu/main-loop.h +++ b/include/qemu/main-loop.h @@ -223,6 +223,16 @@ int qemu_add_child_watch(pid_t pid); #endif /** + * qemu_mutex_iothread_locked: Return lock status of the main loop mutex. + * + * The main loop mutex is the coarsest lock in QEMU, and as such it + * must always be taken outside other locks. This function helps + * functions take different paths depending on whether the current + * thread is running within the main loop mutex. + */ +bool qemu_mutex_iothread_locked(void); + +/** * qemu_mutex_lock_iothread: Lock the main loop mutex. * * This function locks the main loop mutex. The mutex is taken by |