diff options
author | Sebastian Wilhelmi <wilhelmi@ira.uka.de> | 2001-08-30 14:19:20 +0000 |
---|---|---|
committer | Sebastian Wilhelmi <wilhelmi@src.gnome.org> | 2001-08-30 14:19:20 +0000 |
commit | bd2329ae666d23952ff808ae8745a353a3c4e662 (patch) | |
tree | 264e725bdcdd1e4cedb2650b5e6b85f11d407678 /glib/gthread.h | |
parent | cf11b57917f8ece400386925975c6418541d1b20 (diff) | |
download | glib-bd2329ae666d23952ff808ae8745a353a3c4e662.tar.gz |
Add 'want_to_read' to GStaticRWLock to avoid calling g_cond_broadcast,
2001-08-30 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib/gthread.h, glib/gthread.c: Add 'want_to_read' to
GStaticRWLock to avoid calling g_cond_broadcast, when no one is
waiting.
Diffstat (limited to 'glib/gthread.h')
-rw-r--r-- | glib/gthread.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/glib/gthread.h b/glib/gthread.h index 58043bf06..215cc287a 100644 --- a/glib/gthread.h +++ b/glib/gthread.h @@ -263,10 +263,11 @@ struct _GStaticRWLock GCond *write_cond; guint read_counter; gboolean write; + guint want_to_read; guint want_to_write; }; -#define G_STATIC_RW_LOCK_INIT { G_STATIC_MUTEX_INIT, NULL, NULL, 0, FALSE, FALSE } +#define G_STATIC_RW_LOCK_INIT { G_STATIC_MUTEX_INIT, NULL, NULL, 0, FALSE, 0, 0 } void g_static_rw_lock_init (GStaticRWLock* lock); void g_static_rw_lock_reader_lock (GStaticRWLock* lock); |