[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WITHOUT-INTERRUPTS



Without-Interrupts can be very confusing. On the LISPM for example it
is possible to call, knowingly or unknowingly, PROCESS-WAIT from within
a Without-Interrupts, this can then allow a process switch, which
may or may not defeat the purpose of the without-interrupts.
On the VAX, in VAX-NIL which I'm most familiar with, I would be
worried about critical sections of code from the point of view of
AST handlers and such. However, I know that in NIL, by default,
any straight line sequence of code without a function call is
exectuted without testing for the interrupt polling BIT, or, while
writing (or compiling lisp to) LMI-LAMBDA microcode there are similar
considerations, therefore I can take advantage of this condition in
writing code that has possible interlocking dangers. But conditions
are so different in the different lisps that a simple-looking PORTABLE
construct such as CRITICAL-SECTION would not work. Those very people
who would want to use it are probably those that couldnt understand
the underlying mechanisms sufficiently to write such code correctly
and portably.

Instead, maybe a few primitive datastructures, such as QUEUE's with
properly interlocked manipulation primitives could be introduced into
the language. That is to say, what kinds of things are you wanting to
use CRITICAL-SECTION for anyway?