1.0.5.50: some compare-and-swap changes
authorNikodemus Siivola <nikodemus@random-state.net>
Thu, 17 May 2007 16:44:52 +0000 (16:44 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Thu, 17 May 2007 16:44:52 +0000 (16:44 +0000)
 * Since we have a non-threaded %INSTANCE-COMPARE-AND-SWAP on all
   platforms, define DEFINE-STRUCTURE-SLOT-COMPARE-AND-SWAP on
   non-threaded builds as well.

 * Bounds checking SIMPLE-VECTOR-COMPARE-AND-SWAP, plus tests.

package-data-list.lisp-expr
src/code/array.lisp
src/code/late-extensions.lisp
version.lisp-expr

index c4fb513..79889f3 100644 (file)
@@ -1455,6 +1455,7 @@ is a good idea, but see SB-SYS re. blurring of boundaries."
                "SIMPLE-ARRAY-SIGNED-BYTE-8-P" "SIMPLE-BASE-STRING-P"
                #!+sb-unicode "SIMPLE-CHARACTER-STRING-P"
                "SIMPLE-PACKAGE-ERROR" "SIMPLE-UNBOXED-ARRAY"
+               "SIMPLE-VECTOR-COMPARE-AND-SWAP"
                "SINGLE-FLOAT-BITS" "SINGLE-FLOAT-EXPONENT"
                "SINGLE-FLOAT-INT-EXPONENT" "SINGLE-FLOAT-SIGNIFICAND"
                "SINGLE-VALUE-TYPE" "SINGLE-VALUE-SPECIFIER-TYPE"
index d569ad4..873a9b7 100644 (file)
         (values vector index))
       (values array index)))
 
-(defun %simple-vector-compare-and-swap (vector index old new)
+(defun safe-simple-vector-compare-and-swap (vector index old new)
   #!+(or x86 x86-64)
-  (%simple-vector-compare-and-swap vector index old new)
+  (%simple-vector-compare-and-swap vector
+                                   (%check-bound vector (length vector) index)
+                                   old
+                                   new)
   #!-(or x86 x86-64)
   (let ((n-old (svref vector index)))
     (when (eq old n-old)
index 52b45c6..7fed988 100644 (file)
@@ -48,7 +48,6 @@
 
 ;;; Used internally, but it would be nice to provide something
 ;;; like this for users as well.
-#!+sb-thread
 (defmacro define-structure-slot-compare-and-swap
     (name &key structure slot)
   (let* ((dd (find-defstruct-description structure t))
index 47045ec..c389fa3 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.5.49"
+"1.0.5.50"