1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-23 20:05:32 +02:00

* coop.c (coop_mutex_init, coop_mutex_lock, coop_mutex_unlock,

coop_condition_variable_init, coop_condition_variable_wait,
coop_condition_variable_signal): Changed return type from `void'
to `int'.  This is to adhere closer to the pthreads interface.
This, in turn, is part of an attempt to provide C versions of the
mutex and condition variable primitives which can be part of a
frontend to COOP or pthreads.

* coop.c (coop_mutex_destroy, coop_condition_variable_wait_mutex,
coop_condition_variable_destroy): New functions.

* coop-threads.c (scm_wait_condition_variable): Use
coop_condition_variable_wait_mutex.

* coop-threads.h, coop-defs.h (coop_q_t, coop_m, coop_c):
Definitions moved to coop-defs.h.

* coop-defs.h (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock,
scm_mutex_destroy, scm_cond_init, scm_cond_wait, scm_cond_signal,
scm_cond_destroy): New C interface to mutecis and cond vars.
This commit is contained in:
Mikael Djurfeldt 1998-01-26 01:43:16 +00:00
parent 3237b129f7
commit c8bf4ecd10
4 changed files with 114 additions and 43 deletions

View file

@ -501,9 +501,8 @@ scm_wait_condition_variable (c, m)
m,
SCM_ARG2,
s_wait_condition_variable);
coop_mutex_unlock (SCM_MUTEX_DATA (m));
coop_condition_variable_wait (SCM_CONDVAR_DATA (c));
coop_mutex_lock (SCM_MUTEX_DATA (m));
coop_condition_variable_wait_mutex (SCM_CONDVAR_DATA (c),
SCM_MUTEX_DATA (m));
return SCM_BOOL_T;
}