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

Moved export for WITHOUT-{GCING,HEMLOCK} from lispinit to here.

Moved WITH-ENABLED-INTERRUPTS into signal.lisp
parent dd6620d6
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/sysmacs.lisp,v 1.10 1991/07/25 22:24:43 wlott Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/sysmacs.lisp,v 1.11 1992/03/26 03:15:22 wlott Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -15,6 +15,12 @@ ...@@ -15,6 +15,12 @@
;;; ;;;
(in-package "LISP" :use '("SYSTEM" "DEBUG")) (in-package "LISP" :use '("SYSTEM" "DEBUG"))
(in-package "SYSTEM")
(export '(without-gcing without-hemlock))
(in-package "LISP")
;;; WITH-ARRAY-DATA -- Interface ;;; WITH-ARRAY-DATA -- Interface
;;; ;;;
;;; Checks to see if the array is simple and the start and end are in ;;; Checks to see if the array is simple and the start and end are in
...@@ -56,37 +62,6 @@ ...@@ -56,37 +62,6 @@
(when (and *need-to-collect-garbage* (not *gc-inhibit*)) (when (and *need-to-collect-garbage* (not *gc-inhibit*))
(maybe-gc nil)))) (maybe-gc nil))))
(defmacro with-enabled-interrupts (interrupt-list &body body)
"With-enabled-interrupts ({(interrupt function [character])}*) {form}*
Establish function as a handler for the Unix signal interrupt which
should be a number between 1 and 31 inclusive. For the signals that
can be generated from the keyboard, the optional character specifies
the character to use to generate the signal."
(let ((il (gensym))
(fn (gensym))
(ch (gensym))
(it (gensym)))
`(let ((,il NIL))
(unwind-protect
(progn
,@(do* ((item interrupt-list (cdr item))
(intr (caar item) (caar item))
(ifcn (cadar item) (cadar item))
(ichr (caddar item) (caddar item))
(forms NIL))
((null item) (nreverse forms))
(if (symbolp intr)
(setq intr (symbol-value intr)))
(push `(multiple-value-bind (,fn ,ch)
(enable-interrupt ,intr ,ifcn
,ichr)
(push `(,,intr ,,fn ,,ch) ,il)) forms))
,@body)
(dolist (,it (nreverse ,il))
(funcall #'enable-interrupt (car ,it) (cadr ,it) (caddr ,it)))))))
(defvar hi::*in-the-editor* nil) (defvar hi::*in-the-editor* nil)
(defmacro without-hemlock (&body body) (defmacro without-hemlock (&body body)
......
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