X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftarget-hash-table.lisp;h=090606a6509c19ef21c1b06c447380b6f5a9543f;hb=878638b5b594ec6c3e8b2310f7d31435c5935ef2;hp=9ee1e920605358c2107e76e5c987937e4fbc51cd;hpb=03770e700a55a111d9d350b4c2a6fae98662e1ed;p=sbcl.git diff --git a/src/code/target-hash-table.lisp b/src/code/target-hash-table.lisp index 9ee1e92..090606a 100644 --- a/src/code/target-hash-table.lisp +++ b/src/code/target-hash-table.lisp @@ -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 @@ -564,7 +564,7 @@ if there is no such entry. Entries can be added using SETF." ;; redo the lookup if the GC epoch counter has changed. ;; -- JES, 2007-09-30 `(if (and (not ,foundp) - (not (eql start-epoch sb!kernel::*gc-epoch*))) + (not (eq start-epoch sb!kernel::*gc-epoch*))) (go start) (return-from %gethash3 (values ,value ,foundp)))) (overflow ()