gvfs r1383 - in trunk: . client



Author: alexl
Date: Tue Feb 26 08:59:32 2008
New Revision: 1383
URL: http://svn.gnome.org/viewvc/gvfs?rev=1383&view=rev

Log:
2008-02-26  Alexander Larsson  <alexl redhat com>

        * client/gdaemonvolumemonitor.c:
	Use standard lock instead of recursive lock.



Modified:
   trunk/ChangeLog
   trunk/client/gdaemonvolumemonitor.c

Modified: trunk/client/gdaemonvolumemonitor.c
==============================================================================
--- trunk/client/gdaemonvolumemonitor.c	(original)
+++ trunk/client/gdaemonvolumemonitor.c	Tue Feb 26 08:59:32 2008
@@ -33,7 +33,8 @@
 #include "gdaemonvfs.h"
 #include "gmounttracker.h"
 
-static GStaticRecMutex _the_daemon_volume_monitor_mutex = G_STATIC_REC_MUTEX_INIT;
+G_LOCK_DEFINE_STATIC(_the_daemon_volume_monitor);
+
 static GDaemonVolumeMonitor *_the_daemon_volume_monitor;
 
 struct _GDaemonVolumeMonitor {
@@ -51,14 +52,14 @@
   GDaemonVolumeMonitor *monitor;
   GList *l;
 
-  g_static_rec_mutex_lock (&_the_daemon_volume_monitor_mutex);
+  G_LOCK (_the_daemon_volume_monitor);
 
   monitor = G_DAEMON_VOLUME_MONITOR (volume_monitor);
 
   l = g_list_copy (monitor->mounts);
   g_list_foreach (l, (GFunc)g_object_ref, NULL);
 
-  g_static_rec_mutex_unlock (&_the_daemon_volume_monitor_mutex);
+  G_UNLOCK (_the_daemon_volume_monitor);
 
   return l;
 }
@@ -122,7 +123,7 @@
       return NULL;
     }
 
-  g_static_rec_mutex_lock (&_the_daemon_volume_monitor_mutex);
+  G_LOCK (_the_daemon_volume_monitor);
 
   daemon_mount = find_mount_by_mount_info (_the_daemon_volume_monitor, mount_info);
   if (daemon_mount != NULL)
@@ -130,7 +131,7 @@
       g_object_ref (daemon_mount);
     }
 
-  g_static_rec_mutex_unlock (&_the_daemon_volume_monitor_mutex);
+  G_UNLOCK (_the_daemon_volume_monitor);
 
   return daemon_mount;
 }
@@ -141,7 +142,7 @@
   GDaemonMount *mount;
   GVolume *volume;
 
-  g_static_rec_mutex_lock (&_the_daemon_volume_monitor_mutex);
+  G_LOCK (_the_daemon_volume_monitor);
 
   mount = find_mount_by_mount_info (daemon_monitor, mount_info);
   if (mount)
@@ -161,7 +162,7 @@
     }
 
  out:
-  g_static_rec_mutex_unlock (&_the_daemon_volume_monitor_mutex);
+  G_UNLOCK (_the_daemon_volume_monitor);
 }
 
 static void
@@ -169,7 +170,7 @@
 {
   GDaemonMount *mount;
 
-  g_static_rec_mutex_lock (&_the_daemon_volume_monitor_mutex);
+  G_LOCK (_the_daemon_volume_monitor);
 
   mount = find_mount_by_mount_info (daemon_monitor, mount_info);
   if (!mount)
@@ -185,7 +186,7 @@
   g_object_unref (mount);
 
  out:
-  g_static_rec_mutex_unlock (&_the_daemon_volume_monitor_mutex);
+  G_UNLOCK (_the_daemon_volume_monitor);
 }
 
 static void
@@ -230,7 +231,7 @@
 {
   GDaemonVolumeMonitor *monitor;
   
-  g_static_rec_mutex_lock (&_the_daemon_volume_monitor_mutex);
+  G_LOCK (_the_daemon_volume_monitor);
 
   monitor = G_DAEMON_VOLUME_MONITOR (object);
 
@@ -247,7 +248,7 @@
 
   _the_daemon_volume_monitor = NULL;
 
-  g_static_rec_mutex_unlock (&_the_daemon_volume_monitor_mutex);
+  G_UNLOCK (_the_daemon_volume_monitor);
 }
 
 static void



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