[PATCH 32/43] util: virfirewall: 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/virfirewall.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/util/virfirewall.c b/src/util/virfirewall.c
index 22760e6389..3bf85020af 100644
--- a/src/util/virfirewall.c
+++ b/src/util/virfirewall.c
@@ -83,7 +83,7 @@ struct _virFirewall {
 };
 
 static virFirewallBackend currentBackend = VIR_FIREWALL_BACKEND_AUTOMATIC;
-static virMutex ruleLock = VIR_MUTEX_INITIALIZER;
+G_LOCK_DEFINE_STATIC(ruleLock);
 
 static int
 virFirewallValidateBackend(virFirewallBackend backend);
@@ -807,7 +807,7 @@ virFirewallApply(virFirewallPtr firewall)
     size_t i, j;
     int ret = -1;
 
-    virMutexLock(&ruleLock);
+    G_LOCK(ruleLock);
 
     if (currentBackend == VIR_FIREWALL_BACKEND_AUTOMATIC) {
         /* a specific backend should have been set when the firewall
@@ -863,6 +863,6 @@ virFirewallApply(virFirewallPtr firewall)
 
     ret = 0;
  cleanup:
-    virMutexUnlock(&ruleLock);
+    G_UNLOCK(ruleLock);
     return ret;
 }
-- 
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