summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libguile/threads.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libguile/threads.c b/libguile/threads.c
index f4388ce0e..262e2ed9d 100644
--- a/libguile/threads.c
+++ b/libguile/threads.c
@@ -1061,9 +1061,13 @@ enum scm_mutex_kind {
struct scm_mutex {
scm_i_pthread_mutex_t lock;
+ /* The thread that owns this mutex, or #f if the mutex is unlocked. */
SCM owner;
- int level; /* how much the owner owns us. <= 1 for non-recursive mutexes */
- SCM waiting; /* the threads waiting for this mutex. */
+ /* Queue of 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)