(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))))
(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 ()