From: <me...@us...> - 2005-11-18 21:42:06
|
Update of /cvsroot/sbcl/sbcl/src/code In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32197/src/code Modified Files: target-hash-table.lisp Log Message: 0.9.6.52: * fixed hash-table/gc deadlock introduced in .50 Index: target-hash-table.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/src/code/target-hash-table.lisp,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- target-hash-table.lisp 18 Nov 2005 12:28:40 -0000 1.26 +++ target-hash-table.lisp 18 Nov 2005 21:41:57 -0000 1.27 @@ -21,15 +21,19 @@ (defmacro with-spinlock-and-without-gcing ((spinlock) &body body) #!-sb-thread (declare (ignore spinlock)) - `(unwind-protect - (let ((*gc-inhibit* t)) - #!+sb-thread - (sb!thread::get-spinlock ,spinlock) - ,@body) - #!+sb-thread - (sb!thread::release-spinlock ,spinlock) - ;; the test is racy, but it can err only on the overeager side - (sb!kernel::maybe-handle-pending-gc))) + (with-unique-names (old-gc-inhibit) + `(let ((,old-gc-inhibit *gc-inhibit*) + (*gc-inhibit* t)) + (unwind-protect + (progn + #!+sb-thread + (sb!thread::get-spinlock ,spinlock) + ,@body) + #!+sb-thread + (sb!thread::release-spinlock ,spinlock) + (let ((*gc-inhibit* ,old-gc-inhibit)) + ;; the test is racy, but it can err only on the overeager side + (sb!kernel::maybe-handle-pending-gc)))))) (eval-when (:compile-toplevel :load-toplevel :execute) (defconstant max-hash sb!xc:most-positive-fixnum)) |