From 5ab19ba25007a2083a187aca54f635335426f29c Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Mon, 23 May 2011 15:34:10 +0000 Subject: [PATCH] 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. --- src/runtime/hashtb.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.25.1