~ chicken-core (chicken-5) f016cd78979654ef43d7dbd90b0e96382274a1b4
commit f016cd78979654ef43d7dbd90b0e96382274a1b4
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Thu Dec 13 20:14:48 2012 +0100
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Thu Dec 13 20:14:48 2012 +0100
some comments
diff --git a/srfi-18.scm b/srfi-18.scm
index 93de135e..44f5c67a 100644
--- a/srfi-18.scm
+++ b/srfi-18.scm
@@ -323,20 +323,20 @@
(lambda (return)
(let ([waiting (##sys#slot mutex 3)]
[limit (and timeout (compute-time-limit timeout 'mutex-unlock!))] )
- (##sys#setislot mutex 4 #f)
- (##sys#setislot mutex 5 #f)
+ (##sys#setislot mutex 4 #f) ; abandoned
+ (##sys#setislot mutex 5 #f) ; blocked
(let ((t (##sys#slot mutex 2)))
(when t
- (##sys#setslot t 8 (##sys#delq mutex (##sys#slot t 8)))))
+ (##sys#setslot t 8 (##sys#delq mutex (##sys#slot t 8))))) ; unown from owner
(when cvar
(##sys#setslot cvar 2 (##sys#append (##sys#slot cvar 2) (##sys#list ct)))
- (##sys#setslot ct 11 cvar)
+ (##sys#setslot ct 11 cvar) ; block object
(cond (limit
(##sys#setslot
ct 1
(lambda ()
(##sys#setslot cvar 2 (##sys#delq ct (##sys#slot cvar 2)))
- (##sys#setslot ct 11 #f)
+ (##sys#setslot ct 11 #f) ; block object
(if (##sys#slot ct 13) ; unblocked by timeout
(return #f)
(begin
Trap