X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fthreads.impure.lisp;h=e0973ff8b04d572eff7b06bad7c6a9ef2476e5fe;hb=782a45c5d5000d7e86c83e7b303f15270b1e03c2;hp=18a337661b3c2af773e26e961bb109f51c29c098;hpb=2378b4fe567a8fea78b1e4915b9497d8c18ca92f;p=sbcl.git diff --git a/tests/threads.impure.lisp b/tests/threads.impure.lisp index 18a3376..e0973ff 100644 --- a/tests/threads.impure.lisp +++ b/tests/threads.impure.lisp @@ -121,7 +121,8 @@ (lambda () (with-mutex (lock) (assert (eql (mutex-value lock) (current-thread-id)))) - (assert (not (eql (mutex-value lock) (current-thread-id))))))) + (assert (not (eql (mutex-value lock) (current-thread-id)))) + (sleep 60)))) ;;hold onto lock for long enough that child can't get it immediately (sleep 20) (interrupt-thread child (lambda () (format t "l ~A~%" (mutex-value lock)))) @@ -130,8 +131,9 @@ (defun alloc-stuff () (copy-list '(1 2 3 4 5))) (let ((c (test-interrupt (lambda () (loop (alloc-stuff)))))) - ;; NB this only works on x86 - (dotimes (i 70) + ;; NB this only works on x86: other ports don't have a symbol for + ;; pseudo-atomic atomicity + (dotimes (i 100) (sleep (random 1d0)) (interrupt-thread c (lambda ()