;; FIXME: this does not work on SMP Pentium Pro and OOSTORE systems,
;; neither on most non-x86 architectures (but we don't have threads
;; on those).
- (setf (spinlock-value spinlock) nil))
+ (setf (spinlock-value spinlock) nil)
+
+ ;; FIXME: Is a :memory barrier too strong here? Can we use a :write
+ ;; barrier instead?
+ #!+(not (or x86 x86-64))
+ (barrier (:memory)))
\f
;;;; Mutexes
#!-sb-thread (ignore waitp timeout))
(unless new-owner
(setq new-owner *current-thread*))
+ (barrier (:read))
(let ((old (mutex-%owner mutex)))
(when (eq new-owner old)
(error "Recursive lock attempt ~S." mutex))
(with-interrupts (%lutex-lock lutex))
(%lutex-trylock lutex))))
(setf (mutex-%owner mutex) new-owner)
+ (barrier (:write))
t))
#!-sb-lutex
;; This is a direct translation of the Mutex 2 algorithm from
#!-sb-thread (error "Not supported in unithread builds.")
#!+sb-thread
(let ((me *current-thread*))
+ (barrier (:read))
(assert (eq me (mutex-%owner mutex)))
(/show0 "CONDITION-WAITing")
#!+sb-lutex
(with-lutex-address (mutex-lutex-address (mutex-lutex mutex))
(with-local-interrupts
(%lutex-wait queue-lutex-address mutex-lutex-address)))))
- (setf (mutex-%owner mutex) me)))
+ (barrier (:write)
+ (setf (mutex-%owner mutex) me))))
#!-sb-lutex
;; Need to disable interrupts so that we don't miss grabbing the
;; mutex on our way out.
;;; 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.41.5"
+"1.0.41.6"