Skip to content
Snippets Groups Projects
Commit c77672f2 authored by wlott's avatar wlott
Browse files

Removed {with,without}-interrupts 'cause better (i.e. working) versions

exist in signal.lisp.
parent 21d5cdfb
No related branches found
No related tags found
No related merge requests found
...@@ -49,30 +49,6 @@ ...@@ -49,30 +49,6 @@
(maybe-gc nil)))) (maybe-gc nil))))
(defmacro with-interrupts (&body body)
`(let ((iin %sp-interrupts-inhibited))
(setq %sp-interrupts-inhibited NIL)
(when (consp iin)
(dolist (x iin)
(let ((f (svref *software-interrupt-vector* (car x))))
(when f (apply f x)))))
(unwind-protect
(progn ,@body)
(if iin (setq %sp-interrupts-inhibited T)))))
(defmacro without-interrupts (&rest body)
"Evaluates the forms in the Body without allowing interrupts."
`(let* ((old-interrupts-inhibited %sp-interrupts-inhibited)
(%sp-interrupts-inhibited (or %sp-interrupts-inhibited T)))
(multiple-value-prog1
(progn ,@body)
(when (and (null old-interrupts-inhibited)
(consp %sp-interrupts-inhibited))
(dolist (x %sp-interrupts-inhibited)
(let ((f (svref *software-interrupt-vector* (car x))))
(when f (apply f x))))))))
(defmacro with-enabled-interrupts (interrupt-list &body body) (defmacro with-enabled-interrupts (interrupt-list &body body)
"With-enabled-interrupts ({(interrupt function [character])}*) {form}* "With-enabled-interrupts ({(interrupt function [character])}*) {form}*
Establish function as a handler for the Unix signal interrupt which Establish function as a handler for the Unix signal interrupt which
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment