From: Nikodemus Siivola Date: Sat, 19 Nov 2011 15:00:57 +0000 (+0200) Subject: clarify GET-CAS-EXPANSION docstring X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=d0d44ccf079f6ecaadea0616c85d733181634001;p=sbcl.git clarify GET-CAS-EXPANSION docstring --- diff --git a/src/code/cas.lisp b/src/code/cas.lisp index 9fcb006..17e4112 100644 --- a/src/code/cas.lisp +++ b/src/code/cas.lisp @@ -42,12 +42,21 @@ EXPERIMENTAL: Interface subject to change." (defun get-cas-expansion (place &optional environment) #!+sb-doc - "Analogous to GET-SETF-EXPANSION. Return six values needed by the CAS -machinary: a list of temporary variables, a list of values to which they must -be bound, a temporary variable for the old value of PLACE, a temporary value -for the new value of PLACE, a form using the aforementioned temporaries -which performs the compare-and-swap operation, and a form using the aforementioned -temporaries with which to perform a volatile read of the place. + "Analogous to GET-SETF-EXPANSION. Returns the following six values: + + * list of temporary variables + + * list of value-forms whose results those variable must be bound + + * temporary variable for the old value of PLACE + + * temporary variable for the new value of PLACE + + * form using the aforementioned temporaries which performs the + compare-and-swap operation on PLACE + + * form using the aforementioned temporaries with which to perform a volatile + read of PLACE Example: diff --git a/src/code/target-thread.lisp b/src/code/target-thread.lisp index 5eb0e8a..d451bb1 100644 --- a/src/code/target-thread.lisp +++ b/src/code/target-thread.lisp @@ -58,9 +58,6 @@ WITH-CAS-LOCK can be entered recursively." do (sb!ext:spin-loop-hint)) do (thread-yield))) ,@body) - ;; FIXME: SETF + write barrier should to be enough here. - ;; ...but GET-CAS-EXPANSION doesn't return a WRITE-FORM. - ;; ...maybe it should? (unless (eq ,owner ,self) (let ((,old ,self) (,new nil))