All Manuals > LispWorks® User Guide and Reference Manual > 42 The MP Package

without-interrupts Macro

Summary

This macro is obsolete. Causes any interrupts that occur during the execution of a body of code to be queued, in non-SMP LispWorks only.

Package

mp

Signature

without-interrupts &rest body => result

Arguments
body
The forms to execute while interrupts are queued.
Values
result
The result of executing body.
Description

The macro without-interrupts execute body.

While body is executing, all interrupts (for example, preemption, keyboard break etc.) are queued. They are executed when body exits.

Notes

without-interrupts is not supported in SMP LispWorks.

Examples

To ensure that the seconds and milliseconds slots are always consistent in non-SMP LispWorks, you can use without-interrupts within the function which sets them.

(defstruct elapsed-time
  seconds
  milliseconds)
(defun update-elapsed-time-atomically 
     (elapsed-time seconds milliseconds)
  (mp:without-interrupts
   (setf (elapsed-time-seconds elapsed-time) seconds
         (elapsed-time-milliseconds elapsed-time)
         milliseconds)))
See also

without-preemption


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:51