glib/gobject
Alexander Larsson 8f27a5e621 Implement lock free interface lookup
We implement lock free interface lookup by moving the n_ifaces
counter into memory pointed to by TypeNode->iface_entries, and
then updating this in RCU-style by always copying it, modifying
the copy and then when the modification is done replace the old
pointer with g_atomic_pointer_set.

There is one additional complexity when freeing the old memory,
since the old memory region can be in use. To handle this we
don't free such memory, but put it on a free list and reuse it
later. This means that lock-free lookups must be able to
handle the memory being modified in random ways without crashing,
and at the end we verify that the memory didn't change and the
transaction is ok.

With this infrastructure the patch then implements a lock-free
version of type_lookup_iface_entry_L called type_lookup_iface_vtable_I
and use it in: g_type_interface_peek, g_type_interface_peek_parent
and type_node_check_conformities_UorL.

Using the performance tests from bug 557100 shows that the general
performance difference is negligible, but the lack of a lock for each
type check and interface vfunc call should greatly enhance threaded
scalability.
2009-11-30 20:50:21 +01:00
..
tests Bug 549771 – improved .gitignore for glib 2008-09-02 18:40:39 +00:00
.gitignore Bug 549771 – improved .gitignore for glib 2008-09-02 18:40:39 +00:00
abicheck.sh Fix abi checks for ia64. 2005-08-15 05:00:57 +00:00
ChangeLog Update README files to refer to git 2009-03-31 19:39:16 -04:00
gatomicarray.c Add GAtomicArray for RCU-style lockless updates 2009-11-30 20:48:50 +01:00
gatomicarray.h Add GAtomicArray for RCU-style lockless updates 2009-11-30 20:48:50 +01:00
gboxed.c Bug 580450 – Reference counting and boxed types for arrays 2009-04-29 11:17:23 -04:00
gboxed.h Bug 580450 – Reference counting and boxed types for arrays 2009-04-29 11:17:23 -04:00
gclosure.c Fix "it's" vs "its" confusion throughout the source. Patch by Will 2009-02-23 04:30:06 +00:00
gclosure.h Add one missing ':' and reformate GParamFlags docs. 2008-06-21 14:00:44 +00:00
genums.c Fix up section comments 2008-07-02 03:43:13 +00:00
genums.h Fix "it's" vs "its" confusion throughout the source. Patch by Will 2009-02-23 04:30:06 +00:00
glib-genmarshal.1 added new command-line option "--internal" that can be used to let 2006-08-23 06:45:55 +00:00
glib-genmarshal.c More of the same 2009-03-01 15:42:03 +00:00
glib-mkenums.1 Add @basename@ substitution to glib-mkenums 2009-07-03 20:50:27 +02:00
glib-mkenums.in Accept -? for glib-mkenums. 2009-09-22 11:22:44 +03:00
gmarshal.list Add g_signal_accumulator_true_handled(), to do TRUE-stops-emit signals. 2003-09-12 20:33:31 +00:00
gobject-query.c Use the right binary name in help output. Patch by Hiroyuki Ikezoe. 2008-07-06 02:01:56 +00:00
gobject.c g_object_unref racy condition can lead to crash 2009-10-06 12:27:12 -04:00
gobject.h Add flags member for GObjectClass 2009-10-02 21:02:48 +02:00
gobject.py Initial support for gdb python macros 2009-09-21 15:39:00 +02:00
gobject.rc.in Don't use autoconf variables for the resource object files on Win32 any 2005-07-08 23:04:06 +00:00
gobject.symbols Bug 580450 – Reference counting and boxed types for arrays 2009-04-29 11:17:23 -04:00
gobjectnotifyqueue.c Allocate GObjectNotifyQueue with g_slice instead of abusing g_list 2009-10-02 21:02:48 +02:00
gparam.c Fix "it's" vs "its" confusion throughout the source. Patch by Will 2009-02-23 04:30:06 +00:00
gparam.h Fix "it's" vs "its" confusion throughout the source. Patch by Will 2009-02-23 04:30:06 +00:00
gparamspecs.c Fix up section comments 2008-07-02 03:43:13 +00:00
gparamspecs.h Migrating docs. 2008-06-21 22:16:14 +00:00
gsignal.c when defaulting to the only item in the array, check if this is indeed the 2009-03-13 09:22:57 +00:00
gsignal.h Bug 541208 – Functions to easily install and use signals without class 2008-07-04 11:10:17 +00:00
gsourceclosure.c remove trailing whitespace from newly added gtk-doc comments and 2008-06-22 14:53:09 +00:00
gsourceclosure.h Migrating docs. 2008-06-21 12:18:12 +00:00
gtype.c Implement lock free interface lookup 2009-11-30 20:50:21 +01:00
gtype.h gobject/gtype.h: Fix _G_TYPE_CVH macro. Fixes #597194 2009-10-03 16:17:17 +02:00
gtypemodule.c Always reset the use count to its previous value before returning FALSE. 2008-12-02 05:14:00 +00:00
gtypemodule.h Cast iface_init to GInterfaceInitFunc 2009-11-26 12:32:36 +01:00
gtypeplugin.c Fix up section comments 2008-07-02 03:43:13 +00:00
gtypeplugin.h Migrating docs. 2008-06-21 18:20:43 +00:00
gvalue.c Bug 523939 – Example program for GValue 2008-08-22 18:23:05 +00:00
gvalue.h Migrating docs. 2008-06-21 12:45:49 +00:00
gvaluearray.c Fix up section comments 2008-07-02 03:43:13 +00:00
gvaluearray.h Migrating docs. 2008-06-22 09:45:13 +00:00
gvaluecollector.h Migrating docs. 2008-06-22 09:53:11 +00:00
gvaluetransform.c remove trailing whitespace from newly added gtk-doc comments and 2008-06-22 14:53:09 +00:00
gvaluetypes.c Clarify some docs 2008-08-01 18:36:01 +00:00
gvaluetypes.h Migrating docs. 2008-06-21 22:16:14 +00:00
libgobject-gdb.py.in Initial support for gdb python macros 2009-09-21 15:39:00 +02:00
Makefile.am Add GAtomicArray for RCU-style lockless updates 2009-11-30 20:48:50 +01:00
makefile.msc.in update 2008-02-03 22:41:06 +00:00
makegobjectalias.pl Make work again. 2005-03-14 06:47:51 +00:00
marshal-genstrings.pl Hacky script to fix up your .msc.in files on windows. Dunno if this is a 2001-08-04 15:49:55 +00:00
pltcheck.sh Make these work on x86_64 2008-12-13 23:56:05 +00:00
testgobject.c Remove some unused code. Same here And here Mark some functions static. 2005-09-08 06:35:44 +00:00