Call the procedure in HASH-TABLE/MODIFY! before blocking interrupts.
authorTaylor R Campbell <campbell@mumble.net>
Mon, 23 May 2011 15:36:07 +0000 (15:36 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Mon, 23 May 2011 15:36:07 +0000 (15:36 +0000)
Previously the interrupt mask during the call to the procedure
depended on whether there was already an entry in the table, which
is silly.

src/runtime/hashtb.scm

index feda12e743d282633b585692d88058b1d7cb6900..acb098d4f4e0dd45abea17fc000b9027a72a340a 100644 (file)
@@ -653,12 +653,12 @@ USA.
              (lambda (key* datum barrier)
                (declare (integrate key* datum barrier))
                (if (key=? key* key)
-                   (with-table-locked! table
-                     (lambda ()
-                       (let ((datum* (procedure datum)))
-                         (set-entry-datum! entry-type (car p) datum*)
-                         (barrier)
-                         datum*)))
+                   (let ((datum* (procedure datum)))
+                     (with-table-locked! table
+                       (lambda ()
+                         (set-entry-datum! entry-type (car p) datum*)))
+                     (barrier)
+                     datum*)
                    (loop (cdr p) p)))
              (lambda () (loop (cdr p) p)))
            (let ((datum (procedure default)))