[PATCH 14/43] util: virlog: convert virMutex to GMutex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Rafael Fonseca <r4f4rfs@xxxxxxxxx>
---
 src/util/virlog.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/util/virlog.c b/src/util/virlog.c
index e4944d1258..2c98a4cca8 100644
--- a/src/util/virlog.c
+++ b/src/util/virlog.c
@@ -125,19 +125,19 @@ static void virLogOutputToFd(virLogSourcePtr src,
 /*
  * Logs accesses must be serialized though a mutex
  */
-virMutex virLogMutex;
+G_LOCK_DEFINE(virLogMutex);
 
 void
 virLogLock(void)
 {
-    virMutexLock(&virLogMutex);
+    G_LOCK(virLogMutex);
 }
 
 
 void
 virLogUnlock(void)
 {
-    virMutexUnlock(&virLogMutex);
+    G_UNLOCK(virLogMutex);
 }
 
 
@@ -247,9 +247,6 @@ virLogPriorityString(virLogPriority lvl)
 static int
 virLogOnceInit(void)
 {
-    if (virMutexInit(&virLogMutex) < 0)
-        return -1;
-
     virLogLock();
     virLogDefaultPriority = VIR_LOG_DEFAULT;
 
-- 
2.25.2






[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux