1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 12:20:26 +02:00

* pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added

support for debugging mutex operations.
This commit is contained in:
Mikael Djurfeldt 2002-12-16 20:29:18 +00:00
parent 0b6843b1eb
commit 6da2dfc4e0
3 changed files with 30 additions and 1 deletions

View file

@ -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