From: Taylor R Campbell Date: Mon, 23 May 2011 15:34:10 +0000 (+0000) Subject: Must disable interrupts for SET-ENTRY-DATUM!. X-Git-Tag: 20110609-Gtk~1^2~6 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=5ab19ba25007a2083a187aca54f635335426f29c;p=mit-scheme.git Must disable interrupts for SET-ENTRY-DATUM!. It would probably be better to add a DISCRETIONARY-WITH-TABLE-LOCKED operation to the entry type abstraction, so that the overhead of blocking interrupts would be incurred only for key&datum-ephemeral tables, which are the only ones that need it. --- diff --git a/src/runtime/hashtb.scm b/src/runtime/hashtb.scm index 5675eed69..feda12e74 100644 --- a/src/runtime/hashtb.scm +++ b/src/runtime/hashtb.scm @@ -626,8 +626,11 @@ USA. (lambda (key* barrier) (declare (integrate key* barrier)) (if (key=? key* key) - (begin (set-entry-datum! entry-type (car p) datum) - (barrier)) + (begin + (with-table-locked! table + (lambda () + (set-entry-datum! entry-type (car p) datum))) + (barrier)) (loop (cdr p) p))) (lambda () (loop (cdr p) p))) (with-table-locked! table