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
c0c1a60b
Commit
c0c1a60b
authored
33 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Added some changes from Miles.
parent
cf52846d
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
ldb/sunos-os.c
+31
-8
31 additions, 8 deletions
ldb/sunos-os.c
with
31 additions
and
8 deletions
ldb/sunos-os.c
+
31
−
8
View file @
c0c1a60b
/*
/*
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/sunos-os.c,v 1.
1
1991/0
5/24 18:43:45
wlott Exp $
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/sunos-os.c,v 1.
2
1991/0
9/04 15:01:36
wlott 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.
...
@@ -35,6 +35,8 @@
...
@@ -35,6 +35,8 @@
#define MAX_SEGS 64
#define MAX_SEGS 64
extern
char
*
getenv
();
/* ---------------------------------------------------------------- */
/* ---------------------------------------------------------------- */
#define ADJ_OFFSET(off,adj) (((off)==OFFSET_NONE) ? OFFSET_NONE : ((off)+(adj)))
#define ADJ_OFFSET(off,adj) (((off)==OFFSET_NONE) ? OFFSET_NONE : ((off)+(adj)))
...
@@ -58,12 +60,15 @@ static os_vm_size_t real_page_size_difference=0;
...
@@ -58,12 +60,15 @@ static os_vm_size_t real_page_size_difference=0;
void
os_init
()
void
os_init
()
{
{
void
sunos_segv_handler
(
);
char
*
empty_file
=
getenv
(
"CMUCL_EMPTYFILE"
);
zero_fd
=
open
(
ZEROFILE
,
O_RDONLY
);
if
(
empty_file
==
NULL
)
empty_file
=
EMPTYFILE
;
empty_fd
=
open
(
EMPTYFILE
,
O_RDONLY
|
O_CREAT
);
empty_fd
=
open
(
empty_file
,
O_RDONLY
|
O_CREAT
);
unlink
(
EMPTYFILE
);
unlink
(
empty_file
);
zero_fd
=
open
(
ZEROFILE
,
O_RDONLY
);
os_vm_page_size
=
getpagesize
();
os_vm_page_size
=
getpagesize
();
...
@@ -660,15 +665,33 @@ caddr_t addr;
...
@@ -660,15 +665,33 @@ caddr_t addr;
* note that we check for a gc-trigger hit even if it's not a PROT error
* note that we check for a gc-trigger hit even if it's not a PROT error
*/
*/
else
if
(
!
maybe_gc
(
context
)){
else
if
(
!
maybe_gc
(
context
)){
if
(
code
==
SEGV_NOMAP
)
static
int
nomap_count
=
0
;
fprintf
(
stderr
,
"segv_handler: No mapping fault: 0x%08x
\n
"
,
addr
);
else
if
(
SEGV_CODE
(
code
)
==
SEGV_OBJERR
)
{
if
(
code
==
SEGV_NOMAP
){
if
(
nomap_count
==
0
){
fprintf
(
stderr
,
"segv_handler: No mapping fault: 0x%08x
\n
"
,
addr
);
nomap_count
++
;
}
else
{
/*
* There should be higher-level protection against stack
* overflow somewhere, but at least this prevents infinite
* puking of error messages...
*/
fprintf
(
stderr
,
"segv_handler: Recursive no mapping fault (stack overflow?)
\n
"
);
exit
(
-
1
);
}
}
else
if
(
SEGV_CODE
(
code
)
==
SEGV_OBJERR
){
extern
int
errno
;
extern
int
errno
;
errno
=
SEGV_ERRNO
(
code
);
errno
=
SEGV_ERRNO
(
code
);
perror
(
"segv_handler: Object error"
);
perror
(
"segv_handler: Object error"
);
}
}
interrupt_handle_now
(
sig
,
code
,
context
);
interrupt_handle_now
(
sig
,
code
,
context
);
if
(
code
==
SEGV_NOMAP
)
nomap_count
--
;
}
}
}
}
...
...
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