CVSROOT: /cvs/gnome Module name: glib Changes by: matthiasc 05/07/15 12:51:10
Modified files: . : ChangeLog configure.in glib : giochannel.c tests : Makefile.am gobject : ChangeLog gobject.c gsignal.c gparam.c gclosure.c Added files: tests/refcount : Makefile.am objects.c objects2.c properties.c properties2.c signals.c Log message: 2005-07-15 Matthias Clasen <[EMAIL PROTECTED]> Make refcounting threadsafe by using atomic operations. (#166020, Wim Taymans) * gobject.c: Use a recursive lock to protect the notify queue. (g_object_unref): Get rid of g_object_last_unref and do the last unref handling in g_object_unref. (g_object_ref, g_object_unref): Use atomic operations. * gsignal.c (struct _HandlerMatch): Use a full integer for the ref_count field. (handler_ref, handler_unref_R): Use atomic operations. * gparam.c (g_param_spec_ref, g_param_spec_unref): Use atomic operations instead of a lock to make the refcounting threadsafe. * gclosure.c (g_closure_ref, g_closure_unref): Use atomic operations. This is more complicated here, since the refcount is stored in a bitfield, so we also have to access all other bitfield members atomically. * gsignal.c (handlers_find): Read the meta_marshal flag of the closure atomically. * tests/Makefile.am (SUBDIRS): Add tests/refcount * configure.in: Add tests/refcount * tests/refcount/properties.c: Test property changes from multiple threads. * tests/refcount/signals.c: Test signal emission from multiple threads. * tests/refcount/objects.c: Test refcounting from multiple threads. * tests/refcount/objects2.c: * tests/refcount/properties2.c: Tests to measure the overhead of threadsafe refcounting. * glib/giochannel.c (g_io_channel_ref, g_io_channel_unref): Use atomic operations to make refcounting threadsafe. (#166020, Wim Taymans) URL : http://cvs.gnome.org/bonsai/cvsquery.cgi?branch=&dir=glib&who=matthiasc&date=explicit&mindate=2005-07-15%2012:50&maxdate=2005-07-15%2012:52 _______________________________________________ cvs-commits-list mailing list cvs-commits-list@gnome.org http://mail.gnome.org/mailman/listinfo/cvs-commits-list