[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 08/08: More comments in threads.c
From: |
Andy Wingo |
Subject: |
[Guile-commits] 08/08: More comments in threads.c |
Date: |
Sun, 13 Nov 2016 14:58:54 +0000 (UTC) |
wingo pushed a commit to branch master
in repository guile.
commit 9ac2c9942b75d3e891ae8eabc219b68bfdf61f9c
Author: Andy Wingo <address@hidden>
Date: Sun Nov 13 15:55:58 2016 +0100
More comments in threads.c
* libguile/threads.c (struct scm_mutex): Better comments.
---
libguile/threads.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libguile/threads.c b/libguile/threads.c
index f4388ce..262e2ed 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)
- [Guile-commits] branch master updated (6bdd955 -> 9ac2c99), Andy Wingo, 2016/11/13
- [Guile-commits] 04/08: Unlocked mutexes don't have owners, Andy Wingo, 2016/11/13
- [Guile-commits] 03/08: Put mutex kind in SMOB flags, Andy Wingo, 2016/11/13
- [Guile-commits] 07/08: Optimize lock-mutex, Andy Wingo, 2016/11/13
- [Guile-commits] 02/08: Rename Guile's internal mutexes and condvars, Andy Wingo, 2016/11/13
- [Guile-commits] 05/08: Refactor GC implications of thread sleep, Andy Wingo, 2016/11/13
- [Guile-commits] 06/08: Improve mutexes / condition variable implementation, Andy Wingo, 2016/11/13
- [Guile-commits] 01/08: Internal threads refactor, Andy Wingo, 2016/11/13
- [Guile-commits] 08/08: More comments in threads.c,
Andy Wingo <=