diff --git a/gobject/gobject.c b/gobject/gobject.c index fe00f1078..15b667620 100644 --- a/gobject/gobject.c +++ b/gobject/gobject.c @@ -125,8 +125,7 @@ enum { * integers to GObjectPrivate. But increasing memory usage for more parallelism * (per-object!) is not worth it. */ #define OPTIONAL_BIT_LOCK_WEAK_REFS 1 -#define OPTIONAL_BIT_LOCK_NOTIFY 2 -#define OPTIONAL_BIT_LOCK_TOGGLE_REFS 3 +#define OPTIONAL_BIT_LOCK_TOGGLE_REFS 2 #if SIZEOF_INT == 4 && GLIB_SIZEOF_VOID_P >= 8 #define HAVE_OPTIONAL_FLAGS_IN_GOBJECT 1 @@ -713,15 +712,10 @@ g_object_notify_queue_freeze_cb (gpointer *data, static GObjectNotifyQueue * g_object_notify_queue_freeze (GObject *object) { - GObjectNotifyQueue *nqueue; - - object_bit_lock (object, OPTIONAL_BIT_LOCK_NOTIFY); - nqueue = _g_datalist_id_update_atomic (&object->qdata, - quark_notify_queue, - g_object_notify_queue_freeze_cb, - object); - object_bit_unlock (object, OPTIONAL_BIT_LOCK_NOTIFY); - return nqueue; + return _g_datalist_id_update_atomic (&object->qdata, + quark_notify_queue, + g_object_notify_queue_freeze_cb, + object); } static gpointer @@ -765,15 +759,11 @@ g_object_notify_queue_thaw (GObject *object, guint n_pspecs; GSList *slist; - object_bit_lock (object, OPTIONAL_BIT_LOCK_NOTIFY); - nqueue = _g_datalist_id_update_atomic (&object->qdata, quark_notify_queue, g_object_notify_queue_thaw_cb, ((gpointer[]){ object, nqueue })); - object_bit_unlock (object, OPTIONAL_BIT_LOCK_NOTIFY); - if (!nqueue) return; @@ -870,8 +860,6 @@ g_object_notify_queue_add (GObject *object, { gpointer result; - object_bit_lock (object, OPTIONAL_BIT_LOCK_NOTIFY); - result = _g_datalist_id_update_atomic (&object->qdata, quark_notify_queue, g_object_notify_queue_add_cb, @@ -882,8 +870,6 @@ g_object_notify_queue_add (GObject *object, .in_init = in_init, })); - object_bit_unlock (object, OPTIONAL_BIT_LOCK_NOTIFY); - return GPOINTER_TO_INT (result); }