Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
4a6663d5
Commit
4a6663d5
authored
33 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Moved WITH-ENABLED-INTERRUPTS here from sysmacs.lisp.
Moved exports for system:mumble-interrupt routines to here from lispinit.
parent
c3c35ad4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/signal.lisp
+43
-4
43 additions, 4 deletions
code/signal.lisp
with
43 additions
and
4 deletions
code/signal.lisp
+
43
−
4
View file @
4a6663d5
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
;;; 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/signal.lisp,v 1.1
4
1992/03/2
3
0
4:23:09
wlott Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/signal.lisp,v 1.1
5
1992/03/2
6
0
3:16:30
wlott Exp $"
)
;;;
;;;
;;; **********************************************************************
;;; **********************************************************************
;;;
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/signal.lisp,v 1.1
4
1992/03/2
3
0
4:23:09
wlott Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/signal.lisp,v 1.1
5
1992/03/2
6
0
3:16:30
wlott Exp $
;;;
;;;
;;; Code for handling UNIX signals.
;;; Code for handling UNIX signals.
;;;
;;;
...
@@ -20,12 +20,18 @@
...
@@ -20,12 +20,18 @@
(
in-package
"UNIX"
)
(
in-package
"UNIX"
)
(
use-package
"KERNEL"
)
(
use-package
"KERNEL"
)
(
export
'
(
unix-signal-name
unix-signal-description
unix-signal-number
(
export
'
(
unix-signal-name
unix-signal-description
unix-signal-number
sigmask
unix-sigblock
unix-sigpause
unix-sigsetmask
unix-kill
sigmask
unix-sigblock
unix-sigpause
unix-sigsetmask
unix-kill
unix-killpg
))
unix-killpg
))
(
export
'kernel::signal-init
(
find-package
"KERNEL"
))
(
in-package
"KERNEL"
)
(
export
'
(
signal-init
))
(
in-package
"SYSTEM"
)
(
export
'
(
without-interrupts
with-interrupts
with-enabled-interrupts
enable-interrupt
ignore-interrupt
default-interrupt
))
(
in-package
"UNIX"
)
;;; These should probably be somewhere, but I don't know where.
;;; These should probably be somewhere, but I don't know where.
;;;
;;;
...
@@ -326,3 +332,36 @@
...
@@ -326,3 +332,36 @@
(
do-pending-interrupt
))
(
do-pending-interrupt
))
(
,
name
))))))
(
,
name
))))))
;;;; WITH-ENABLED-INTERRUPTS
(
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
)))))))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment