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
59daab12
Commit
59daab12
authored
31 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Wrote the gengc version of without-interrupts.
parent
71c74aa3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/signal.lisp
+31
-5
31 additions, 5 deletions
code/signal.lisp
with
31 additions
and
5 deletions
code/signal.lisp
+
31
−
5
View file @
59daab12
...
@@ -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
7
199
2
/0
7/09 19:27
:0
5
wlott Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/signal.lisp,v 1.1
8
199
3
/0
5/20 13:58
:0
2
wlott Exp $"
)
;;;
;;;
;;; **********************************************************************
;;; **********************************************************************
;;;
;;;
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/signal.lisp,v 1.1
7
199
2
/0
7/09 19:27
:0
5
wlott Exp $
;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/signal.lisp,v 1.1
8
199
3
/0
5/20 13:58
:0
2
wlott Exp $
;;;
;;;
;;; Code for handling UNIX signals.
;;; Code for handling UNIX signals.
;;;
;;;
...
@@ -294,9 +294,6 @@
...
@@ -294,9 +294,6 @@
;;; with the cost of delivering the signal in the first place.
;;; with the cost of delivering the signal in the first place.
;;;
;;;
(
defvar
*interrupts-enabled*
t
)
(
defvar
*interrupt-pending*
nil
)
;;; DO-PENDING-INTERRUPT -- internal
;;; DO-PENDING-INTERRUPT -- internal
;;;
;;;
;;; Magically converted by the compiler into a break instruction.
;;; Magically converted by the compiler into a break instruction.
...
@@ -304,6 +301,11 @@
...
@@ -304,6 +301,11 @@
(
defun
do-pending-interrupt
()
(
defun
do-pending-interrupt
()
(
do-pending-interrupt
))
(
do-pending-interrupt
))
#-
gengc
(
progn
(
defvar
*interrupts-enabled*
t
)
(
defvar
*interrupt-pending*
nil
)
;;; WITHOUT-INTERRUPTS -- puiblic
;;; WITHOUT-INTERRUPTS -- puiblic
;;;
;;;
(
defmacro
without-interrupts
(
&body
body
)
(
defmacro
without-interrupts
(
&body
body
)
...
@@ -332,6 +334,30 @@
...
@@ -332,6 +334,30 @@
(
do-pending-interrupt
))
(
do-pending-interrupt
))
(
,
name
))))))
(
,
name
))))))
)
; #-gengc progn
;;; On the GENGC system, we have to do it slightly differently because of the
;;; existance of threads. Each thread has a suspends_disabled_count in its
;;; mutator structure. When this value is other then zero, the low level stuff
;;; will not suspend the thread, but will instead set the suspend_pending flag
;;; (also in the mutator). So when we finish the without-interrupts, we just
;;; check the suspend_pending flag and trigger a do-pending-interrupt if
;;; necessary.
#+
gengc
(
defmacro
without-interrupts
(
&body
body
)
`
(
unwind-protect
(
progn
(
locally
(
declare
(
optimize
(
speed
3
)
(
safety
0
)))
(
incf
(
kernel:mutator-suspends-disabled-count
)))
,@
body
)
(
locally
(
declare
(
optimize
(
speed
3
)
(
safety
0
)))
(
when
(
and
(
zerop
(
decf
(
kernel:mutator-suspends-disabled-count
)))
(
not
(
zerop
(
kernel:mutator-suspend-pending
))))
(
do-pending-interrupt
)))))
;;;; WITH-ENABLED-INTERRUPTS
;;;; WITH-ENABLED-INTERRUPTS
...
...
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