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.
(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