No recursion needed: use WITH-THREAD-MUTEX-LOCK.
authorTaylor R Campbell <campbell@mumble.net>
Tue, 9 Jun 2015 04:22:11 +0000 (04:22 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Tue, 9 Jun 2015 04:22:11 +0000 (04:22 +0000)
src/runtime/thread-queue.scm

index a60b8a38111291c52ff102c56270915edbd2ba43..53f8c9e34b5d0ed1b61c42253282e3573cafbd31 100644 (file)
@@ -74,12 +74,12 @@ USA.
   (thread-mutex-owner (%thread-queue/mutex queue)))
 
 (define (with-queue-locked queue thunk)
-  (with-thread-mutex-locked (%thread-queue/mutex queue)
+  (with-thread-mutex-lock (%thread-queue/mutex queue)
     (lambda ()
       (with-thread-events-blocked thunk))))
 
 (define (with-queue-unlocked queue thunk)
-  (with-thread-mutex-unlocked (%thread-queue/mutex queue)
+  (without-thread-mutex-lock (%thread-queue/mutex queue)
    ;; suspend-current-thread will unblock (and re-block) thread-events
    thunk))