[glib] kqueue: Reduce G_GNUC_INTERNAL + G_LOCK abuse
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] kqueue: Reduce G_GNUC_INTERNAL + G_LOCK abuse
- Date: Mon, 14 Jan 2013 04:48:37 +0000 (UTC)
commit 59e46c4928243f63072996f6e98dab24d765df05
Author: Ryan Lortie <desrt desrt ca>
Date: Sun Jan 13 23:43:44 2013 -0500
kqueue: Reduce G_GNUC_INTERNAL + G_LOCK abuse
The kqueue file monitoring backend was misusing G_GNUC_INTERNAL for want
of 'static' in a couple of places and also using it to declare a lock
that was never used at all.
Fix those up.
gio/kqueue/kqueue-helper.c | 4 +---
gio/kqueue/kqueue-missing.c | 2 +-
gio/kqueue/kqueue-thread.c | 4 ++--
3 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/gio/kqueue/kqueue-helper.c b/gio/kqueue/kqueue-helper.c
index 87f4032..1a95b83 100644
--- a/gio/kqueue/kqueue-helper.c
+++ b/gio/kqueue/kqueue-helper.c
@@ -43,10 +43,8 @@
static gboolean kh_debug_enabled = FALSE;
#define KH_W if (kh_debug_enabled) g_warning
-G_GNUC_INTERNAL G_LOCK_DEFINE (kqueue_lock);
-
static GHashTable *subs_hash_table = NULL;
-G_GNUC_INTERNAL G_LOCK_DEFINE (hash_lock);
+G_LOCK_DEFINE_STATIC (hash_lock);
static int kqueue_descriptor = -1;
static int kqueue_socket_pair[] = {-1, -1};
diff --git a/gio/kqueue/kqueue-missing.c b/gio/kqueue/kqueue-missing.c
index 797f227..9ea3c3e 100644
--- a/gio/kqueue/kqueue-missing.c
+++ b/gio/kqueue/kqueue-missing.c
@@ -35,7 +35,7 @@ static gboolean km_debug_enabled = FALSE;
#define KM_W if (km_debug_enabled) g_warning
static GSList *missing_subs_list = NULL;
-G_GNUC_INTERNAL G_LOCK_DEFINE (missing_lock);
+G_LOCK_DEFINE_STATIC (missing_lock);
static volatile gboolean scan_missing_running = FALSE;
static on_create_cb file_appeared_callback;
diff --git a/gio/kqueue/kqueue-thread.c b/gio/kqueue/kqueue-thread.c
index 4b492e0..c335ae5 100644
--- a/gio/kqueue/kqueue-thread.c
+++ b/gio/kqueue/kqueue-thread.c
@@ -36,10 +36,10 @@ static gboolean kt_debug_enabled = FALSE;
#define KT_W if (kt_debug_enabled) g_warning
static GQueue pick_up_fds_queue = G_QUEUE_INIT;
-G_GNUC_INTERNAL G_LOCK_DEFINE (pick_up_lock);
+G_LOCK_DEFINE_STATIC (pick_up_lock);
static GSList *remove_fds_list = NULL;
-G_GNUC_INTERNAL G_LOCK_DEFINE (remove_lock);
+G_LOCK_DEFINE_STATIC (remove_lock);
/* GIO does not have analogues for NOTE_LINK and(?) NOTE_REVOKE, so
* we do not ask kqueue() to watch for these events for now. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]