Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/atomics.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

;; There are some underlying assumptions here that need to be tested against.
;; We need to do some more thorough testing against other implementations.
#-(or sbcl ccl ecl)
(error "cl-freelock requires atomic operations support from the Lisp implementation. Supported: SBCL, CCL, ECL.")
#-(or sbcl ccl ecl clasp)
(error "cl-freelock requires atomic operations support from the Lisp implementation. Supported: SBCL, CCL, ECL, Clasp")

;; We define a simple structure to hold a value that can be atomically updated.
;; This acts as our atomic pointer/reference.
Expand All @@ -22,7 +22,9 @@
`(ccl::conditional-store (atomic-ref-value ,place) ,old ,new)
#+ecl
`(mp:compare-and-swap (atomic-ref-value ,place) ,old ,new)
#-(or sbcl ccl ecl)
#+clasp
`(mp:cas (atomic-ref-value ,place) ,old ,new)
#-(or sbcl ccl ecl clasp)
`(error "CAS not implemented for this Lisp."))

(defmacro atomic-incf (atomic-ref &optional (delta 1))
Expand Down Expand Up @@ -63,7 +65,9 @@
(cas *sbcl-barrier-dummy* nil nil)
#+ccl
(ccl:hard-memory-barrier)
#+clasp
(mp:fence :sequentially-consistent)
#+ecl
(progn)
#-(or sbcl ccl ecl)
#-(or sbcl ccl ecl clasp)
(error "Memory barrier not implemented for this Lisp."))
Loading