mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 01:36:17 +01:00
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.
This commit is contained in:
parent
64e1a9ca50
commit
59e46c4928
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user