From 4255b37e50876702d2563f3418a44a3f5bf8a2e8 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Thu, 10 Nov 2011 19:09:37 +0200 Subject: [PATCH] fix unthreaded build CONDITION-WAIT on threadless builds now reads TIMEOUT. Stray MUTEX/LOCK naming confusion. #+sb-thread on more mailbox test. #!+sb-thread %WAIT-FOR-MUTEX for cleanliness. --- contrib/sb-concurrency/tests/test-mailbox.lisp | 1 + src/code/target-thread.lisp | 4 +++- src/code/thread.lisp | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/contrib/sb-concurrency/tests/test-mailbox.lisp b/contrib/sb-concurrency/tests/test-mailbox.lisp index db4b221..e6cee14 100644 --- a/contrib/sb-concurrency/tests/test-mailbox.lisp +++ b/contrib/sb-concurrency/tests/test-mailbox.lisp @@ -38,6 +38,7 @@ (3 nil (#\1 #\2 #\3) nil) (0 t nil t)) +#+sb-thread (deftest mailbox-timeouts (let* ((mbox (make-mailbox)) (writers (loop for i from 1 upto 20 diff --git a/src/code/target-thread.lisp b/src/code/target-thread.lisp index 0d0ccb9..553dc67 100644 --- a/src/code/target-thread.lisp +++ b/src/code/target-thread.lisp @@ -493,6 +493,7 @@ HOLDING-MUTEX-P." ;; Spin. (go :retry)))) +#!+sb-thread (defun %wait-for-mutex (mutex self timeout to-sec to-usec stop-sec stop-usec deadlinep) (with-deadlocks (self mutex timeout) (with-interrupts (check-deadlock)) @@ -732,7 +733,8 @@ around the call, checking the the associated data: (push data *data*) (condition-notify *queue*))) " - #!-sb-thread (declare (ignore queue timeout)) + #!-sb-thread + (declare (ignore queue)) (assert mutex) #!-sb-thread (wait-for nil :timeout timeout) ; Yeah... diff --git a/src/code/thread.lisp b/src/code/thread.lisp index c471fc9..6e42788 100644 --- a/src/code/thread.lisp +++ b/src/code/thread.lisp @@ -207,7 +207,7 @@ provided the default value is used for the mutex." (funcall function))) (defun call-with-recursive-system-lock/without-gcing (function mutex) - (declare (function function) (ignore lock)) + (declare (function function) (ignore mutex)) (without-gcing (funcall function)))) -- 1.7.10.4