summaryrefslogtreecommitdiff
path: root/libguile/pthread-threads.c
diff options
context:
space:
mode:
authorMikael Djurfeldt <djurfeldt@nada.kth.se>2002-12-16 20:29:18 +0000
committerMikael Djurfeldt <djurfeldt@nada.kth.se>2002-12-16 20:29:18 +0000
commit6da2dfc4e03d9aa842eadb5048bfc601f5aac23c (patch)
tree6d9366728a0d7b7290f39975329db777e74068b1 /libguile/pthread-threads.c
parent0b6843b1eb38ecec4d1c5711745505845a9fc809 (diff)
downloadguile-6da2dfc4e03d9aa842eadb5048bfc601f5aac23c.tar.gz
* pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
support for debugging mutex operations.
Diffstat (limited to 'libguile/pthread-threads.c')
-rw-r--r--libguile/pthread-threads.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libguile/pthread-threads.c b/libguile/pthread-threads.c
index 58410db16..8aa0e6fca 100644
--- a/libguile/pthread-threads.c
+++ b/libguile/pthread-threads.c
@@ -142,6 +142,23 @@ scm_i_plugin_mutex_unlock (scm_t_mutex *mx)
pthread_mutex_unlock (&mutex_mutex);
return 0;
}
+
+int
+scm_i_plugin_cond_wait (scm_t_cond *c, scm_t_mutex *mx)
+{
+ mutex *m = (mutex *) mx;
+ return pthread_cond_wait ((pthread_cond_t *) c, m->mutex);
+}
+
+int
+scm_i_plugin_cond_wait (scm_t_cond *c,
+ scm_t_mutex *mx,
+ const struct timespec *t)
+{
+ mutex *m = (mutex *) mx;
+ return pthread_cond_timedwait ((pthread_cond_t *) c, m->mutex, t);
+}
+
#endif
/* The following section belongs in threads.c, or rather