From ba9112b2f0ba10230be5bdfc75c8e082da9bfbe0 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Mon, 29 Mar 2010 15:31:25 +0000 Subject: [PATCH] 1.0.37.16: fix build * Oops. Missing package prefixes and wrong slot type for SEMAPHORE-WAITCOUNT. --- src/code/target-thread.lisp | 9 +++++---- version.lisp-expr | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/code/target-thread.lisp b/src/code/target-thread.lisp index 6f31ada..2e5edfa 100644 --- a/src/code/target-thread.lisp +++ b/src/code/target-thread.lisp @@ -644,7 +644,7 @@ should be considered an implementation detail, and may change in the future." (name nil :type (or null simple-string)) (%count 0 :type (integer 0)) - (waitcount 0 :type (integer 0)) + (waitcount 0 :type sb!vm:word) (mutex (make-mutex)) (queue (make-waitqueue))) @@ -681,15 +681,16 @@ negative. Else blocks until the semaphore can be decremented." ;; Need to use ATOMIC-INCF despite the lock, because on our ;; way out from here we might not be locked anymore -- so ;; another thread might be tweaking this in parallel using - ;; ATOMIC-DECF. - (atomic-incf (semaphore-waitcount semaphore)) + ;; ATOMIC-DECF. No danger over overflow, since there it + ;; at most one increment per thread waiting on the semaphore. + (sb!ext:atomic-incf (semaphore-waitcount semaphore)) (loop until (plusp (setf count (semaphore-%count semaphore))) do (condition-wait (semaphore-queue semaphore) (semaphore-mutex semaphore))) (setf (semaphore-%count semaphore) (1- count))) ;; Need to use ATOMIC-DECF instead of DECF, as CONDITION-WAIT ;; may unwind without the lock being held due to timeouts. - (atomic-decf (semaphore-waitcount semaphore))))))) + (sb!ext:atomic-decf (semaphore-waitcount semaphore))))))) (defun try-semaphore (semaphore &optional (n 1)) #!+sb-doc diff --git a/version.lisp-expr b/version.lisp-expr index 79735f6..a34cbb9 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.37.15" \ No newline at end of file +"1.0.37.16" -- 1.7.10.4