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:
parent
0b6843b1eb
commit
6da2dfc4e0
3 changed files with 30 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue