|
@@ -152,7 +152,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(QemuLockable, qemu_lockable_auto_unlock)
|
|
|
* }
|
|
|
*/
|
|
|
#define WITH_QEMU_LOCK_GUARD(x) \
|
|
|
- WITH_QEMU_LOCK_GUARD_((x), qemu_lockable_auto##__COUNTER__)
|
|
|
+ WITH_QEMU_LOCK_GUARD_((x), glue(qemu_lockable_auto, __COUNTER__))
|
|
|
|
|
|
/**
|
|
|
* QEMU_LOCK_GUARD - Lock an object until the end of the scope
|
|
@@ -169,8 +169,9 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(QemuLockable, qemu_lockable_auto_unlock)
|
|
|
* return; <-- mutex is automatically unlocked
|
|
|
* }
|
|
|
*/
|
|
|
-#define QEMU_LOCK_GUARD(x) \
|
|
|
- g_autoptr(QemuLockable) qemu_lockable_auto##__COUNTER__ = \
|
|
|
+#define QEMU_LOCK_GUARD(x) \
|
|
|
+ g_autoptr(QemuLockable) \
|
|
|
+ glue(qemu_lockable_auto, __COUNTER__) G_GNUC_UNUSED = \
|
|
|
qemu_lockable_auto_lock(QEMU_MAKE_LOCKABLE((x)))
|
|
|
|
|
|
#endif
|