Fix thread-safety
authorBenjamin Otte <otte@gnome.org>
Fri, 20 Nov 2009 15:47:09 +0000 (16:47 +0100)
committerBenjamin Otte <otte@gnome.org>
Fri, 20 Nov 2009 15:49:47 +0000 (16:49 +0100)
commitec79146572aece95c7bc032b486e6a57015ee6e4
tree896cd86f6d9ed4cb67f284413c9c3bdcaaabbc6a
parentba2b2bbca2b747d704ae62e99fc7d216f82111ff
Fix thread-safety

The n_children variable can be written when locked, while the n_supers
variable is read at any time. As they both share the same bytes,
accessing them is not threadsafe.
This patch puts them into different bytes.

Thanks to Xan Lopez and valgrind for noticing this.
gobject/gtype.c