summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2016-11-13 15:55:58 +0100
committerAndy Wingo <wingo@pobox.com>2016-11-13 15:56:21 +0100
commit9ac2c9942b75d3e891ae8eabc219b68bfdf61f9c (patch)
tree7bd3a7bf14b5ec3a279af35c8bd2b92009bd4aaa
parente0f17417e681aa4591e41f7edb52c7684ca59aae (diff)
downloadguile-9ac2c9942b75d3e891ae8eabc219b68bfdf61f9c.tar.gz
More comments in threads.c
* libguile/threads.c (struct scm_mutex): Better comments.
-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)