1.0.23.61: tweak concurrent hash-table access check
authorNikodemus Siivola <nikodemus@random-state.net>
Sun, 21 Dec 2008 15:03:11 +0000 (15:03 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Sun, 21 Dec 2008 15:03:11 +0000 (15:03 +0000)
 * Moves the with-concurrent-access-check inside the body where
   the lock is already held. Patch by Attila Lendvai.

 * Fix various attributions in NEWS, caught by TCR.

NEWS
src/code/target-hash-table.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 8d233a1..e5f7394 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,7 @@
   * new feature: ARRAY-STORAGE-VECTOR provides access to the underlying
     data vector of an multidimensional SIMPLE-ARRAY.
   * new feature: the system now signals a continuable error if standard
-    readtable modification is attempted.
+    readtable modification is attempted. (thanks to Tobias Rittweiler)
   * optimization: faster generic arithmetic dispatch on x86 and x86-64.
   * optimization: FORMAT ~D and ~F are now approximately 5% faster.
   * tradeoff: constant FORMAT control strings are now compiled unless
@@ -37,7 +37,7 @@
     REPL unusable. (reported by Daniel Herring)
   * bug fix: return values of READ-SEQUENCE did not take :START into
     account on file streams, regressions since 1.0.12.22. (reported by
-    Daniel Herring, patch by Paul Huong)
+    Thomas Russ, patch by Paul Khuong)
   * bug fix: using SET or (SETF SYMBOL-VALUE) to change the value of a
     method specializer used to confuse permuation vector optimization.
   * bug fix: system inserted bogus implicit type declarations for local
index 977d768..090606a 100644 (file)
@@ -520,22 +520,22 @@ multiple threads accessing the same hash-table without locking."
                                  &body body)
   (declare (type (member :read :write) operation))
   (with-unique-names (body-fun)
-    `(with-concurrent-access-check ,hash-table ,operation
-       (flet ((,body-fun ()
+    `(flet ((,body-fun ()
+              (with-concurrent-access-check ,hash-table ,operation
                 (locally (declare (inline ,@inline))
-                  ,@body)))
-         (if (hash-table-weakness ,hash-table)
-             (sb!thread::with-recursive-system-spinlock
-                 ((hash-table-spinlock ,hash-table) :without-gcing t)
-               (,body-fun))
-             (with-pinned-objects ,pin
-               (if ,synchronized
-                   ;; We use a "system" spinlock here because it is very
-                   ;; slightly faster, as it doesn't re-enable interrupts.
-                   (sb!thread::with-recursive-system-spinlock
-                       ((hash-table-spinlock ,hash-table))
-                     (,body-fun))
-                   (,body-fun))))))))
+                  ,@body))))
+       (if (hash-table-weakness ,hash-table)
+           (sb!thread::with-recursive-system-spinlock
+               ((hash-table-spinlock ,hash-table) :without-gcing t)
+             (,body-fun))
+           (with-pinned-objects ,pin
+             (if ,synchronized
+                 ;; We use a "system" spinlock here because it is very
+                 ;; slightly faster, as it doesn't re-enable interrupts.
+                 (sb!thread::with-recursive-system-spinlock
+                     ((hash-table-spinlock ,hash-table))
+                   (,body-fun))
+                 (,body-fun)))))))
 
 (defun gethash (key hash-table &optional default)
   #!+sb-doc
index 3b61640..a626923 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.23.60"
+"1.0.23.61"