diff options
author | Ryan Lortie <desrt@desrt.ca> | 2011-09-21 14:39:59 -0400 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2011-09-21 16:09:05 -0400 |
commit | aecec33c4949e022abe6b335f83223495004c09f (patch) | |
tree | 6ff5fe1a5ae5d4c2f338c0c1299eb5d9eec0fccd /gobject | |
parent | b6140c2f89e3d9a613623b7eacad631360837df3 (diff) |
gtype: port from GStaticRWLock to GRWLock
Diffstat (limited to 'gobject')
-rw-r--r-- | gobject/gtype.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gobject/gtype.c b/gobject/gtype.c index 218b2fd5c..da1624014 100644 --- a/gobject/gtype.c +++ b/gobject/gtype.c @@ -103,15 +103,15 @@ */ #ifdef LOCK_DEBUG -#define G_READ_LOCK(rw_lock) do { g_printerr (G_STRLOC ": readL++\n"); g_static_rw_lock_reader_lock (rw_lock); } while (0) -#define G_READ_UNLOCK(rw_lock) do { g_printerr (G_STRLOC ": readL--\n"); g_static_rw_lock_reader_unlock (rw_lock); } while (0) -#define G_WRITE_LOCK(rw_lock) do { g_printerr (G_STRLOC ": writeL++\n"); g_static_rw_lock_writer_lock (rw_lock); } while (0) -#define G_WRITE_UNLOCK(rw_lock) do { g_printerr (G_STRLOC ": writeL--\n"); g_static_rw_lock_writer_unlock (rw_lock); } while (0) +#define G_READ_LOCK(rw_lock) do { g_printerr (G_STRLOC ": readL++\n"); g_rw_lock_reader_lock (rw_lock); } while (0) +#define G_READ_UNLOCK(rw_lock) do { g_printerr (G_STRLOC ": readL--\n"); g_rw_lock_reader_unlock (rw_lock); } while (0) +#define G_WRITE_LOCK(rw_lock) do { g_printerr (G_STRLOC ": writeL++\n"); g_rw_lock_writer_lock (rw_lock); } while (0) +#define G_WRITE_UNLOCK(rw_lock) do { g_printerr (G_STRLOC ": writeL--\n"); g_rw_lock_writer_unlock (rw_lock); } while (0) #else -#define G_READ_LOCK(rw_lock) g_static_rw_lock_reader_lock (rw_lock) -#define G_READ_UNLOCK(rw_lock) g_static_rw_lock_reader_unlock (rw_lock) -#define G_WRITE_LOCK(rw_lock) g_static_rw_lock_writer_lock (rw_lock) -#define G_WRITE_UNLOCK(rw_lock) g_static_rw_lock_writer_unlock (rw_lock) +#define G_READ_LOCK(rw_lock) g_rw_lock_reader_lock (rw_lock) +#define G_READ_UNLOCK(rw_lock) g_rw_lock_reader_unlock (rw_lock) +#define G_WRITE_LOCK(rw_lock) g_rw_lock_writer_lock (rw_lock) +#define G_WRITE_UNLOCK(rw_lock) g_rw_lock_writer_unlock (rw_lock) #endif #define INVALID_RECURSION(func, arg, type_name) G_STMT_START{ \ static const gchar _action[] = " invalidly modified type "; \ @@ -368,7 +368,7 @@ typedef struct { /* --- variables --- */ -static GStaticRWLock type_rw_lock = G_STATIC_RW_LOCK_INIT; +static GRWLock type_rw_lock = G_RW_LOCK_INIT; static GRecMutex class_init_rec_mutex = G_REC_MUTEX_INIT; static guint static_n_class_cache_funcs = 0; static ClassCacheFunc *static_class_cache_funcs = NULL; |