[PATCH 08/43] util: virnodesuspend: convert virMutex to GMutex

Rafael Fonseca r4f4rfs at gmail.com
Fri Apr 10 13:54:35 UTC 2020


Signed-off-by: Rafael Fonseca <r4f4rfs at gmail.com>
---
 src/util/virnodesuspend.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/util/virnodesuspend.c b/src/util/virnodesuspend.c
index 544a29783c..f336b3aa98 100644
--- a/src/util/virnodesuspend.c
+++ b/src/util/virnodesuspend.c
@@ -49,18 +49,18 @@ VIR_LOG_INIT("util.nodesuspend");
 static unsigned int nodeSuspendTargetMask;
 static bool nodeSuspendTargetMaskInit;
 
-static virMutex virNodeSuspendMutex = VIR_MUTEX_INITIALIZER;
+G_LOCK_DEFINE_STATIC(virNodeSuspendMutex);
 
 static bool aboutToSuspend;
 
 static void virNodeSuspendLock(void)
 {
-    virMutexLock(&virNodeSuspendMutex);
+    G_LOCK(virNodeSuspendMutex);
 }
 
 static void virNodeSuspendUnlock(void)
 {
-    virMutexUnlock(&virNodeSuspendMutex);
+    G_UNLOCK(virNodeSuspendMutex);
 }
 
 
-- 
2.25.2





More information about the libvir-list mailing list