diff options
author | Sebastian Wilhelmi <wilhelmi@ira.uka.de> | 2000-11-28 12:56:57 +0000 |
---|---|---|
committer | Sebastian Wilhelmi <wilhelmi@src.gnome.org> | 2000-11-28 12:56:57 +0000 |
commit | fe0f325777257b9266955bc4e091c9deea327a39 (patch) | |
tree | 7d06191fd5e1004f8432109669aa7dfd8c62acd9 /gthread.c | |
parent | dd58473e07451eb62ab62d9723597fc12a071349 (diff) |
Revamped errorcheck mutexes and added errorcheck cond_wait() and
2000-11-28 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gthread-impl.c: Revamped errorcheck mutexes and added errorcheck
cond_wait() and cond_timed_wait() funtions. This makes he whole
thing work. Now we only show the location of the locking/unlocking
for -DG_ERRORCHECK_MUTEXES and not the name of the mutex.
* gthread.c: Set the thread data before locking the mutex, because
the locking call might use g_thread_self ().
* gthread.h: Do only show the location of the locking/unlocking
for -DG_ERRORCHECK_MUTEXES and not the name of the mutex. Add the
errorcheck capability for g_cond_wait and g_cond_timed_wait as
well.
Diffstat (limited to 'gthread.c')
-rw-r--r-- | gthread.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -391,11 +391,12 @@ g_thread_create_proxy (gpointer data) g_assert (data); - /* the lock makes sure, that thread->system_thread is written, - before thread->func is called. See g_thread_create */ + /* This has to happen before G_LOCK, as that might call g_thread_self */ + g_private_set (g_thread_specific_private, data); + /* the lock makes sure, that thread->system_thread is written, + before thread->func is called. See g_thread_create. */ G_LOCK (g_thread_create); - g_private_set (g_thread_specific_private, data); G_UNLOCK (g_thread_create); thread->func (thread->arg); |