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
0c18a209
Commit
0c18a209
authored
33 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Added RT version of skip_instruction and sigtrap_handler.
Still need the RT support for gc_trigger_hit.
parent
991de3b8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ldb/interrupt.c
+53
-8
53 additions, 8 deletions
ldb/interrupt.c
with
53 additions
and
8 deletions
ldb/interrupt.c
+
53
−
8
View file @
0c18a209
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/interrupt.c,v 1.2
4
1991/0
3/14
22:
0
0:
0
4 wlott Exp $ */
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/interrupt.c,v 1.2
5
1991/0
4/27
22:
4
0:4
8
wlott Exp $ */
/* Interrupt handing magic. */
...
...
@@ -17,7 +17,7 @@
#include
"interrupt.h"
#include
"validate.h"
#define crap_out(msg) do { write(2, msg, sizeof(msg));
abor
t(); } while (0)
#define crap_out(msg) do { write(2, msg, sizeof(msg));
exi
t(
1
); } while (0)
#define FIXNUM_VALUE(lispobj) (((int)lispobj)>>2)
...
...
@@ -144,6 +144,17 @@ static void skip_instruction(context)
context
->
sc_pc
=
context
->
sc_npc
;
context
->
sc_npc
+=
4
;
#endif
#ifdef ibmrt
unsigned
long
pc
=
context
->
sc_iar
;
unsigned
long
prev_inst
=
((
unsigned
long
*
)
pc
)[
-
1
];
if
((
prev_inst
>>
24
)
==
0x89
)
{
short
offset
=
prev_inst
&
0xffff
;
context
->
sc_pc
=
pc
-
4
+
offset
;
}
else
context
->
sc_pc
=
pc
+
4
;
#endif
}
static
void
internal_error
(
signal
,
code
,
context
,
continuable
)
...
...
@@ -488,6 +499,42 @@ static sigemt_handler(signal, code, context)
}
#endif
/****************************************************************\
* RT Specific Signal Handlers *
\****************************************************************/
#ifdef ibmrt
static
sigtrap_handler
(
signal
,
code
,
context
)
int
signal
,
code
;
struct
sigcontext
*
context
;
{
switch
((
*
(
unsigned
long
*
)
context
->
sc_iar
)
&
0xffff
)
{
case
trap_PendingInterrupt
:
handle_pending_interrupt
(
context
);
break
;
case
trap_Halt
:
crap_out
(
"%primitive halt called; the party is over.
\n
"
);
case
trap_Error
:
case
trap_Cerror
:
internal_error
(
signal
,
code
,
context
,
code
==
trap_Cerror
);
break
;
case
trap_Breakpoint
:
sigsetmask
(
context
->
sc_mask
);
fake_foreign_function_call
(
context
);
handle_breakpoint
(
signal
,
code
,
context
);
undo_fake_foreign_function_call
(
context
);
break
;
default:
handle_now
(
signal
,
code
,
context
);
break
;
}
}
#endif
/****************************************************************\
* Stuff to detect and handle hitting the gc trigger. *
\****************************************************************/
...
...
@@ -611,21 +658,19 @@ int (*handler)();
sv
.
sv_handler
=
sigtrap_handler
;
else
if
(
signal
==
SIGFPE
)
sv
.
sv_handler
=
sigfpe_handler
;
else
if
(
signal
==
SIGBUS
||
signal
==
SIGSEGV
)
sv
.
sv_handler
=
sigbus_handler
;
#endif
#ifdef sparc
if
(
signal
==
SIGILL
)
sv
.
sv_handler
=
sigill_handler
;
else
if
(
signal
==
SIGEMT
)
sv
.
sv_handler
=
sigemt_handler
;
else
if
(
signal
==
SIGBUS
)
sv
.
sv_handler
=
sigbus_handler
;
#endif
#ifdef ibmrt
if
(
0
)
;
if
(
signal
==
SIGTRAP
)
sv
.
sv_handler
=
sigtrap_handler
;
#endif
else
if
(
signal
==
SIGBUS
||
signal
==
SIGSEGV
)
sv
.
sv_handler
=
sigbus_handler
;
else
if
(
handler
==
SIG_DFL
||
handler
==
SIG_IGN
)
sv
.
sv_handler
=
handler
;
else
if
(
sigmask
(
signal
)
&
BLOCKABLE
)
...
...
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