turned all modifications to the first 32 integer bits in a closure into

Mon Aug  1 23:00:42 2005  Tim Janik  <timj@imendio.com>

        * gclosure.c: turned all modifications to the first 32 integer bits in a
        closure into atomic accesses. wrapped write accesses into special macros
        to keep the atomic modification logic in a single place. comment cleanups.

        * gclosure.h: made all atomicly accessed closure fields volatile.

        * gobject.h: made ref_count field volatile.
This commit is contained in:
Tim Janik
2005-08-01 21:17:50 +00:00
committed by Tim Janik
parent 7787e71d8b
commit 834ddd1920
5 changed files with 127 additions and 58 deletions

View File

@@ -62,11 +62,11 @@ typedef void (*GWeakNotify) (gpointer data,
GObject *where_the_object_was);
struct _GObject
{
GTypeInstance g_type_instance;
GTypeInstance g_type_instance;
/*< private >*/
guint ref_count;
GData *qdata;
volatile guint ref_count;
GData *qdata;
};
struct _GObjectClass
{