mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +02:00
More comments in threads.c
* libguile/threads.c (struct scm_mutex): Better comments.
This commit is contained in:
parent
e0f17417e6
commit
9ac2c9942b
1 changed files with 6 additions and 2 deletions
|
@ -1061,9 +1061,13 @@ enum scm_mutex_kind {
|
||||||
|
|
||||||
struct scm_mutex {
|
struct scm_mutex {
|
||||||
scm_i_pthread_mutex_t lock;
|
scm_i_pthread_mutex_t lock;
|
||||||
|
/* The thread that owns this mutex, or #f if the mutex is unlocked. */
|
||||||
SCM owner;
|
SCM owner;
|
||||||
int level; /* how much the owner owns us. <= 1 for non-recursive mutexes */
|
/* Queue of threads waiting for this mutex. */
|
||||||
SCM waiting; /* the threads waiting for this mutex. */
|
SCM waiting;
|
||||||
|
/* For SCM_MUTEX_RECURSIVE (and only SCM_MUTEX_RECURSIVE), the
|
||||||
|
recursive lock count. The first lock does not count. */
|
||||||
|
int level;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SCM_MUTEXP(x) SCM_SMOB_PREDICATE (scm_tc16_mutex, x)
|
#define SCM_MUTEXP(x) SCM_SMOB_PREDICATE (scm_tc16_mutex, x)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue