without-interrupts

$Revision: 5.0.2.4 $

Macro

Package: EXCL

Arguments: (&body body)

This macro executes body, protecting against any handling of asynchronous interrupts. Execution of body is guaranteed to complete without any other process running, or any asynchronous interrupt being dispatched, unless the process does something to block or otherwise explicitly yield to the scheduler (e.g. with mp:process-allow-schedule).

without-interrupts is implemented very efficiently and so may be executed frequently. It is generally bad style to wrap a without-interrupts around a body of code that takes a significant amount of time to execute because that may impose inappropriate high interrupt latency on other (possibly unrelated) interrupt handlers. without-interrupts is intended to be used around short critical sections of code; use of a process-lock may be more appropriate for protecting long bodies of code.

In :os-threads implementations of multiprocessing, a lisp process calling a foreign function can release control of the lisp environment so that another lisp process can run.  Any attempt to perform such a heap-releasing call within the scope of a without-interrupts block signals an error and does not release the heap.  Whether error processing overrides the without-interrupts block depends on the coding of the particular application. 

See multiprocessing.htm for general information on multiprocessing in Allegro CL.

The general documentation description is in introduction.htm. The index is in index.htm.

Copyright (C) 1998-1999, Franz Inc., Berkeley, CA. All Rights Reserved.