diff options
Diffstat (limited to 'libcaja-private/caja-file-changes-queue.c')
-rw-r--r-- | libcaja-private/caja-file-changes-queue.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/libcaja-private/caja-file-changes-queue.c b/libcaja-private/caja-file-changes-queue.c index 127de7ed..8b60d63a 100644 --- a/libcaja-private/caja-file-changes-queue.c +++ b/libcaja-private/caja-file-changes-queue.c @@ -25,8 +25,6 @@ #include "caja-directory-notify.h" -#include <src/glibcompat.h> /* for g_list_free_full */ - #ifdef G_THREADS_ENABLED #define MUTEX_LOCK(a) if ((a) != NULL) g_mutex_lock (a) #define MUTEX_UNLOCK(a) if ((a) != NULL) g_mutex_unlock (a) @@ -60,11 +58,7 @@ typedef struct GList *head; GList *tail; #ifdef G_THREADS_ENABLED -# if GLIB_CHECK_VERSION(2, 32, 0) GMutex mutex; -# else - GMutex *mutex; -# endif #endif } CajaFileChangesQueue; @@ -76,11 +70,7 @@ caja_file_changes_queue_new (void) result = g_new0 (CajaFileChangesQueue, 1); #ifdef G_THREADS_ENABLED -# if GLIB_CHECK_VERSION(2, 32, 0) g_mutex_init (&result->mutex); -# else - result->mutex = g_mutex_new (); -# endif #endif return result; } @@ -135,11 +125,7 @@ caja_file_changes_queue_free (CajaFileChangesQueue *queue) g_list_free (queue->head); #ifdef G_THREADS_ENABLED -# if GLIB_CHECK_VERSION(2, 32, 0) g_mutex_clear (&queue->mutex); -# else - g_mutex_free (queue->mutex); -# endif #endif g_free (queue); } @@ -151,21 +137,13 @@ caja_file_changes_queue_add_common (CajaFileChangesQueue *queue, CajaFileChange *new_item) { /* enqueue the new queue item while locking down the list */ -#if GLIB_CHECK_VERSION(2, 32, 0) MUTEX_LOCK (&queue->mutex); -#else - MUTEX_LOCK (queue->mutex); -#endif queue->head = g_list_prepend (queue->head, new_item); if (queue->tail == NULL) queue->tail = queue->head; -#if GLIB_CHECK_VERSION(2, 32, 0) MUTEX_UNLOCK (&queue->mutex); -#else - MUTEX_UNLOCK (queue->mutex); -#endif } void @@ -267,11 +245,7 @@ caja_file_changes_queue_get_change (CajaFileChangesQueue *queue) g_assert (queue != NULL); /* dequeue the tail item while locking down the list */ -#if GLIB_CHECK_VERSION (2, 32, 0) MUTEX_LOCK (&queue->mutex); -#else - MUTEX_LOCK (queue->mutex); -#endif if (queue->tail == NULL) { @@ -287,11 +261,7 @@ caja_file_changes_queue_get_change (CajaFileChangesQueue *queue) queue->tail = new_tail; } -#if GLIB_CHECK_VERSION (2, 32, 0) MUTEX_UNLOCK (&queue->mutex); -#else - MUTEX_UNLOCK (queue->mutex); -#endif return result; } |