clarify GET-CAS-EXPANSION docstring
authorNikodemus Siivola <nikodemus@random-state.net>
Sat, 19 Nov 2011 15:00:57 +0000 (17:00 +0200)
committerNikodemus Siivola <nikodemus@random-state.net>
Sat, 19 Nov 2011 15:04:38 +0000 (17:04 +0200)
src/code/cas.lisp
src/code/target-thread.lisp

index 9fcb006..17e4112 100644 (file)
@@ -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:
 
index 5eb0e8a..d451bb1 100644 (file)
@@ -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))