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
d9db6d61
Commit
d9db6d61
authored
27 years ago
by
dtc
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup the segv_handler.
parent
caea7799
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
lisp/solaris-os.c
+12
-50
12 additions, 50 deletions
lisp/solaris-os.c
with
12 additions
and
50 deletions
lisp/solaris-os.c
+
12
−
50
View file @
d9db6d61
/*
/*
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/solaris-os.c,v 1.
1
1997/09/0
4
0
8:46
:0
2
dtc Exp $
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/solaris-os.c,v 1.
2
1997/09/0
8
0
0:32
:0
0
dtc Exp $
*
*
* OS-dependent routines. This file (along with os.h) exports an
* OS-dependent routines. This file (along with os.h) exports an
* OS-independent interface to the operating system VM facilities.
* OS-independent interface to the operating system VM facilities.
...
@@ -173,59 +173,21 @@ os_vm_address_t test;
...
@@ -173,59 +173,21 @@ os_vm_address_t test;
/* ---------------------------------------------------------------- */
/* ---------------------------------------------------------------- */
static
boolean
maybe_gc
(
HANDLER_ARGS
)
{
/*
* It's necessary to enable recursive SEGVs, since the handler is
* used for multiple things (e.g., both gc-trigger & faulting in pages).
* We check against recursive gc's though...
*/
boolean
did_gc
;
static
already_trying
=
0
;
if
(
already_trying
)
return
FALSE
;
SAVE_CONTEXT
();
#ifdef POSIX_SIGS
sigprocmask
(
SIG_SETMASK
,
&
context
->
uc_sigmask
,
0
);
#else
sigsetmask
(
context
->
sc_mask
);
#endif
already_trying
=
TRUE
;
did_gc
=
interrupt_maybe_gc
(
signal
,
code
,
context
);
already_trying
=
FALSE
;
return
did_gc
;
}
/*
/*
* The primary point of catching segmentation violations is to allow
* Running into the gc trigger page will end up here...
* read only memory to be re-mapped with more permissions when a write
* is attempted. this greatly decreases the residency of the program
* in swap space since read only areas don't take up room
*
* Running into the gc trigger page will also end up here...
*/
*/
void
segv_handler
(
HANDLER_ARGS
)
void
segv_handler
(
HANDLER_ARGS
)
{
{
caddr_t
addr
=
code
->
si_addr
;
caddr_t
addr
=
code
->
si_addr
;
SAVE_CONTEXT
();
SAVE_CONTEXT
();
if
(
maybe_gc
(
signal
,
code
,
context
))
if
(
!
interrupt_maybe_gc
(
signal
,
code
,
context
))
{
/* we just garbage collected */
/* a *real* protection fault */
return
;
fprintf
(
stderr
,
"segv_handler: Real protection violation: 0x%08x
\n
"
,
else
{
addr
);
/* a *real* protection fault */
interrupt_handle_now
(
signal
,
code
,
context
);
fprintf
(
stderr
,
}
"segv_handler: Real protection violation: 0x%08x
\n
"
,
addr
);
interrupt_handle_now
(
signal
,
code
,
context
);
}
}
}
void
os_install_interrupt_handlers
()
void
os_install_interrupt_handlers
()
...
...
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