From: Taylor R Campbell Date: Tue, 9 Jun 2015 04:22:01 +0000 (+0000) Subject: No recursion needed: use WITH-THREAD-MUTEX-LOCK. X-Git-Tag: mit-scheme-pucked-9.2.12~376^2~92 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=1707ea1d4dff5f1aa0acafdf1b16076e82a03ca4;p=mit-scheme.git No recursion needed: use WITH-THREAD-MUTEX-LOCK. --- diff --git a/src/runtime/condvar.scm b/src/runtime/condvar.scm index 552c45310..d1ec02acd 100644 --- a/src/runtime/condvar.scm +++ b/src/runtime/condvar.scm @@ -80,7 +80,7 @@ USA. (define (%condition-variable-wait!/unlock condvar thread-mutex timeout) (let ((waiter (make-waiter (current-thread)))) (let ((blocked? (block-thread-events))) - (with-thread-mutex-locked (condition-variable.lock condvar) + (with-thread-mutex-lock (condition-variable.lock condvar) (lambda () (enqueue-waiter! condvar waiter))) (unlock-thread-mutex thread-mutex) @@ -102,7 +102,7 @@ USA. (loop)))) (if (not (default-object? timeout)) (deregister-timer-event registration)) - (with-thread-mutex-locked (condition-variable.lock condvar) + (with-thread-mutex-lock (condition-variable.lock condvar) (lambda () ;; Signaller got interrupted or we timed out. Clean up. (if (not (waiter-detached? condvar waiter)) @@ -112,7 +112,7 @@ USA. (define (condition-variable-signal! condvar) (guarantee-condition-variable condvar 'CONDITION-VARIABLE-SIGNAL!) - (with-thread-mutex-locked (condition-variable.lock condvar) + (with-thread-mutex-lock (condition-variable.lock condvar) (lambda () (let ((head (condition-variable.waiter-head condvar)) (tail (condition-variable.waiter-tail condvar))) @@ -143,7 +143,7 @@ USA. (define (condition-variable-broadcast! condvar) (guarantee-condition-variable condvar 'CONDITION-VARIABLE-BROADCAST!) - (with-thread-mutex-locked (condition-variable.lock condvar) + (with-thread-mutex-lock (condition-variable.lock condvar) (lambda () (let ((head (condition-variable.waiter-head condvar)) (tail (condition-variable.waiter-tail condvar)))