X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fcache.lisp;h=f70a2a8f8ac8f6e2350423a90357c0077896964b;hb=127fd3d2fb843c6bb7ad0763e143d81877e760e8;hp=b4d3e9da829c97a3cc691ce2ec52255834c11dfa;hpb=6e953f60d904a015b3273db84b5886b04a9ecb1c;p=sbcl.git diff --git a/src/pcl/cache.lisp b/src/pcl/cache.lisp index b4d3e9d..f70a2a8 100644 --- a/src/pcl/cache.lisp +++ b/src/pcl/cache.lisp @@ -149,22 +149,6 @@ (defun cache-key-p (thing) (not (symbolp thing))) -(eval-when (:compile-toplevel :load-toplevel :execute) - (sb-kernel:define-structure-slot-compare-and-swap compare-and-swap-cache-depth - :structure cache - :slot depth)) - -;;; Utility macro for atomic updates without locking... doesn't -;;; do much right now, and it would be nice to make this more magical. -(defmacro compare-and-swap (place old new) - (unless (consp place) - (error "Don't know how to compare and swap ~S." place)) - (ecase (car place) - (svref - `(simple-vector-compare-and-swap ,@(cdr place) ,old ,new)) - (cache-depth - `(compare-and-swap-cache-depth ,@(cdr place) ,old ,new)))) - ;;; Atomically update the current probe depth of a cache. (defun note-cache-depth (cache depth) (loop for old = (cache-depth cache)