diff options
author | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 2002-12-18 10:53:23 +0000 |
---|---|---|
committer | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 2002-12-18 10:53:23 +0000 |
commit | e29e0b0963a6b659f70d78271d2c40e9e2de28e7 (patch) | |
tree | 83b0413167341f34109e1b9f2df2674003027a53 /libguile/pthread-threads.h | |
parent | dad981029a145d7a8854124a558d66a68675ce1f (diff) | |
download | guile-e29e0b0963a6b659f70d78271d2c40e9e2de28e7.tar.gz |
* threads.c (really_launch): Detach before unlocking
thread_admin_mutex in order not to risk being joined.
(scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
thread_admin_mutex locked during GC.
* pthread-threads.c, pthread-threads.h: Improvements to debugging
functions.
Diffstat (limited to 'libguile/pthread-threads.h')
-rw-r--r-- | libguile/pthread-threads.h | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/libguile/pthread-threads.h b/libguile/pthread-threads.h index 2ab3d16a0..2af178ae6 100644 --- a/libguile/pthread-threads.h +++ b/libguile/pthread-threads.h @@ -70,11 +70,7 @@ #define scm_i_plugin_thread_yield sched_yield /* Size is checked in scm_init_pthread_threads */ -#ifdef SCM_DEBUG_THREADS #define SCM_MUTEX_MAXSIZE (9 * sizeof (long)) -#else -#define SCM_MUTEX_MAXSIZE (6 * sizeof (long)) -#endif typedef struct { char _[SCM_MUTEX_MAXSIZE]; } scm_t_mutex; #define scm_t_mutexattr pthread_mutexattr_t @@ -100,15 +96,7 @@ int scm_i_plugin_mutex_unlock (scm_t_mutex *); pthread_mutex_trylock ((pthread_mutex_t *) (m)) /* Size is checked in scm_init_pthread_threads */ -#ifdef SCM_DEBUG_THREADS #define SCM_REC_MUTEX_MAXSIZE (SCM_MUTEX_MAXSIZE + 3 * sizeof (long)) -#else -#ifdef SCM_MUTEX_RECURSIVE -#define SCM_REC_MUTEX_MAXSIZE SCM_MUTEX_MAXSIZE -#else -#define SCM_REC_MUTEX_MAXSIZE (SCM_MUTEX_MAXSIZE + 2 * sizeof (long)) -#endif -#endif typedef struct { char _[SCM_REC_MUTEX_MAXSIZE]; } scm_t_rec_mutex; extern scm_t_mutexattr scm_i_plugin_rec_mutex; @@ -160,6 +148,10 @@ int scm_i_plugin_cond_timedwait (scm_t_cond *, #define scm_i_plugin_select select +#ifdef SCM_DEBUG_THREADS +void scm_i_assert_heap_locked (void); +#endif + void scm_init_pthread_threads (void); #endif /* SCM_THREADS_PTHREADS_H */ |