mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 17:20:29 +02:00
* null-threads.h, pthread-threads.h
(SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Removed. (scm_i_pthread_mutexattr_recursive): New. * threads.c (scm_i_pthread_mutexattr_recursive): Declare. (scm_i_critical_section_mutex): Do not initialize statically. (scm_threads_prehistory): Initialize scm_i_pthread_mutexattr_recursive and scm_i_critical_section_mutex here. * eval.c (source_mutex): Do not initialiaze statically. (scm_init_eval): Do it here, using scm_i_pthread_mutexattr_recursive.
This commit is contained in:
parent
777f2ed60a
commit
d1138028c9
4 changed files with 19 additions and 6 deletions
|
@ -50,13 +50,13 @@
|
|||
/* Mutexes
|
||||
*/
|
||||
#define SCM_I_PTHREAD_MUTEX_INITIALIZER 0
|
||||
#define SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER 0
|
||||
#define scm_i_pthread_mutex_t int
|
||||
#define scm_i_pthread_mutex_init(m,a) (*(m) = 0)
|
||||
#define scm_i_pthread_mutex_destroy(m) do { (void)(m); } while(0)
|
||||
#define scm_i_pthread_mutex_trylock(m) ((*(m))++)
|
||||
#define scm_i_pthread_mutex_lock(m) ((*(m))++)
|
||||
#define scm_i_pthread_mutex_unlock(m) ((*(m))--)
|
||||
#define scm_i_pthread_mutexattr_recursive 0
|
||||
|
||||
/* Condition variables
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue