This makes it very convenient to declare a mutex on stack along with the
VIR_MUTEX_INITIALIZE macro without the need to have complex cleanup.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
int virMutexInit(virMutex *m) G_GNUC_WARN_UNUSED_RESULT;
int virMutexInitRecursive(virMutex *m) G_GNUC_WARN_UNUSED_RESULT;
void virMutexDestroy(virMutex *m);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virMutex, virMutexDestroy);
void virMutexLock(virMutex *m);
void virMutexUnlock(virMutex *m);