* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
*
* Author: Alexander Larsson <alexl@redhat.com>
* David Zeuthen <davidz@redhat.com>
#define g_union_volume_monitor_get_type _g_union_volume_monitor_get_type
G_DEFINE_TYPE (GUnionVolumeMonitor, g_union_volume_monitor, G_TYPE_VOLUME_MONITOR);
-static GStaticRecMutex the_volume_monitor_mutex = G_STATIC_REC_MUTEX_INIT;
+static GRecMutex the_volume_monitor_mutex;
static GUnionVolumeMonitor *the_volume_monitor = NULL;
monitor = G_UNION_VOLUME_MONITOR (object);
- g_static_rec_mutex_lock (&the_volume_monitor_mutex);
+ g_rec_mutex_lock (&the_volume_monitor_mutex);
the_volume_monitor = NULL;
for (l = monitor->monitors; l != NULL; l = l->next)
g_object_run_dispose (G_OBJECT (child_monitor));
}
- g_static_rec_mutex_unlock (&the_volume_monitor_mutex);
+ g_rec_mutex_unlock (&the_volume_monitor_mutex);
G_OBJECT_CLASS (g_union_volume_monitor_parent_class)->dispose (object);
}
res = NULL;
- g_static_rec_mutex_lock (&the_volume_monitor_mutex);
+ g_rec_mutex_lock (&the_volume_monitor_mutex);
for (l = monitor->monitors; l != NULL; l = l->next)
{
res = g_list_concat (res, g_volume_monitor_get_mounts (child_monitor));
}
- g_static_rec_mutex_unlock (&the_volume_monitor_mutex);
+ g_rec_mutex_unlock (&the_volume_monitor_mutex);
return res;
}
res = NULL;
- g_static_rec_mutex_lock (&the_volume_monitor_mutex);
+ g_rec_mutex_lock (&the_volume_monitor_mutex);
for (l = monitor->monitors; l != NULL; l = l->next)
{
res = g_list_concat (res, g_volume_monitor_get_volumes (child_monitor));
}
- g_static_rec_mutex_unlock (&the_volume_monitor_mutex);
+ g_rec_mutex_unlock (&the_volume_monitor_mutex);
return res;
}
res = NULL;
- g_static_rec_mutex_lock (&the_volume_monitor_mutex);
+ g_rec_mutex_lock (&the_volume_monitor_mutex);
for (l = monitor->monitors; l != NULL; l = l->next)
{
res = g_list_concat (res, g_volume_monitor_get_connected_drives (child_monitor));
}
- g_static_rec_mutex_unlock (&the_volume_monitor_mutex);
+ g_rec_mutex_unlock (&the_volume_monitor_mutex);
return res;
}
volume = NULL;
- g_static_rec_mutex_lock (&the_volume_monitor_mutex);
+ g_rec_mutex_lock (&the_volume_monitor_mutex);
for (l = monitor->monitors; l != NULL; l = l->next)
{
}
- g_static_rec_mutex_unlock (&the_volume_monitor_mutex);
+ g_rec_mutex_unlock (&the_volume_monitor_mutex);
return volume;
}
mount = NULL;
- g_static_rec_mutex_lock (&the_volume_monitor_mutex);
+ g_rec_mutex_lock (&the_volume_monitor_mutex);
for (l = monitor->monitors; l != NULL; l = l->next)
{
}
- g_static_rec_mutex_unlock (&the_volume_monitor_mutex);
+ g_rec_mutex_unlock (&the_volume_monitor_mutex);
return mount;
}
{
GVolumeMonitor *vm;
- g_static_rec_mutex_lock (&the_volume_monitor_mutex);
+ g_rec_mutex_lock (&the_volume_monitor_mutex);
if (the_volume_monitor)
vm = G_VOLUME_MONITOR (g_object_ref (the_volume_monitor));
vm = G_VOLUME_MONITOR (the_volume_monitor);
}
- g_static_rec_mutex_unlock (&the_volume_monitor_mutex);
+ g_rec_mutex_unlock (&the_volume_monitor_mutex);
return vm;
}
if (klass->get_mount_for_mount_path)
{
- g_static_rec_mutex_lock (&the_volume_monitor_mutex);
+ g_rec_mutex_lock (&the_volume_monitor_mutex);
mount = klass->get_mount_for_mount_path (mount_path, cancellable);
- g_static_rec_mutex_unlock (&the_volume_monitor_mutex);
+ g_rec_mutex_unlock (&the_volume_monitor_mutex);
}
/* TODO: How do we know this succeeded? Keep in mind that the native
volume = NULL;
- g_static_rec_mutex_lock (&the_volume_monitor_mutex);
+ g_rec_mutex_lock (&the_volume_monitor_mutex);
for (l = the_volume_monitor->monitors; l != NULL; l = l->next)
{
}
}
- g_static_rec_mutex_unlock (&the_volume_monitor_mutex);
+ g_rec_mutex_unlock (&the_volume_monitor_mutex);
return volume;
}