Skip to content

Commit

Permalink
no more waitqueues: patch from Gabor Melis
Browse files Browse the repository at this point in the history
darcs-hash:20050714134740-a4961-2bf43ea112f2a254fe84c0d3ead4bacd6ebf9343.gz
  • Loading branch information
telent committed Jul 14, 2005
1 parent ab7250d commit 3e036ca
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions dependent.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -1329,17 +1329,15 @@
(setf ,place ,new-value)
t))))

;;; we only use this queue for the spinlock word, in fact
#+sbcl
(defvar *conditional-store-queue*
(sb-thread:make-waitqueue :name "conditional store"))

#+sbcl
(defmacro conditional-store (place old-value new-value)
`(sb-thread::with-spinlock (*conditional-store-queue*)
(cond ((eq ,place ,old-value)
(setf ,place ,new-value)
t))))
(progn
(defvar *conditional-store-lock*
(sb-thread:make-mutex :name "conditional store"))
(defmacro conditional-store (place old-value new-value)
`(sb-thread:with-mutex (*conditional-store-lock*)
(cond ((eq ,place ,old-value)
(setf ,place ,new-value)
t)))))

;;;----------------------------------------------------------------------------
;;; IO Error Recovery
Expand Down

0 comments on commit 3e036ca

Please sign in to comment.