guint16 freeze_count;
};
+G_LOCK_DEFINE_STATIC(notify_lock);
+
/* --- functions --- */
static void
g_object_notify_queue_free (gpointer data)
{
GObjectNotifyQueue *nqueue;
+ G_LOCK(notify_lock);
nqueue = g_datalist_id_get_data (&object->qdata, context->quark_notify_queue);
if (!nqueue)
{
G_OBJECT_TYPE_NAME (object), object);
else
nqueue->freeze_count++;
+ G_UNLOCK(notify_lock);
return nqueue;
}
g_return_if_fail (nqueue->freeze_count > 0);
g_return_if_fail (g_atomic_int_get(&object->ref_count) > 0);
+ G_LOCK(notify_lock);
+
/* Just make sure we never get into some nasty race condition */
if (G_UNLIKELY(nqueue->freeze_count == 0)) {
+ G_UNLOCK(notify_lock);
g_warning ("%s: property-changed notification for %s(%p) is not frozen",
G_STRFUNC, G_OBJECT_TYPE_NAME (object), object);
return;
nqueue->freeze_count--;
if (nqueue->freeze_count) {
+ G_UNLOCK(notify_lock);
return;
}
}
g_datalist_id_set_data (&object->qdata, context->quark_notify_queue, NULL);
+ G_UNLOCK(notify_lock);
+
if (n_pspecs)
context->dispatcher (object, n_pspecs, pspecs);
g_free (free_me);
{
GParamSpec *redirect;
+ G_LOCK(notify_lock);
+
g_return_if_fail (nqueue->n_pspecs < 65535);
redirect = g_param_spec_get_redirect_target (pspec);
/* we do the deduping in _thaw */
nqueue->pspecs = g_slist_prepend (nqueue->pspecs, pspec);
nqueue->n_pspecs++;
+
+ G_UNLOCK(notify_lock);
}
}