Skip to content
Snippets Groups Projects
Commit f7c4343a authored by wlott's avatar wlott
Browse files

On the RT, we have to explicitly test the gc-trigger when allocating

instead of catching the page fault.  So instead of having a lot of
code to handle the page fault, we have a lot of code to handle
a conditional trap.
parent e741094c
No related branches found
No related tags found
No related merge requests found
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/interrupt.c,v 1.30 1991/10/22 18:38:06 wlott Exp $ */
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/interrupt.c,v 1.31 1991/11/07 00:08:17 wlott Exp $ */
/* Interrupt handing magic. */
......@@ -279,7 +279,6 @@ struct sigcontext *context;
\****************************************************************/
#ifndef ibmrt
static boolean gc_trigger_hit(context)
struct sigcontext *context;
{
......@@ -293,15 +292,23 @@ static boolean gc_trigger_hit(context)
badaddr < current_dynamic_space + DYNAMIC_SPACE_SIZE);
}
}
#endif
boolean interrupt_maybe_gc(context)
struct sigcontext *context;
{
if (!foreign_function_call_active && gc_trigger_hit(context)) {
if (!foreign_function_call_active
#ifndef ibmrt
&& gc_trigger_hit(context)
#endif
) {
#ifdef mips
set_global_pointer(saved_global_pointer);
#endif
#ifndef ibmrt
clear_auto_gc_trigger();
#endif
if (
#ifdef mips
......@@ -332,8 +339,6 @@ struct sigcontext *context;
return FALSE;
}
#endif
/****************************************************************\
* Noise to install handlers. *
\****************************************************************/
......
......@@ -35,31 +35,51 @@ static sigtrap_handler(signal, code, context)
int signal, code;
struct sigcontext *context;
{
switch (*((unsigned short *)context->sc_iar+1)) {
case trap_PendingInterrupt:
interrupt_handle_pending(context);
break;
switch (*((char *)context->sc_iar)) {
case 0xCC:
/* trap-immediate instruction. */
switch (*((unsigned short *)context->sc_iar+1)) {
case trap_PendingInterrupt:
interrupt_handle_pending(context);
break;
case trap_Halt:
crap_out("%primitive halt called; the party is over.\n");
case trap_Halt:
crap_out("%primitive halt called; the party is over.\n");
case trap_Error:
case trap_Cerror:
interrupt_internal_error(signal, code, context, code==trap_Cerror);
break;
case trap_Error:
case trap_Cerror:
interrupt_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;
case trap_FunctionEndBreakpoint:
sigsetmask(context->sc_mask);
fake_foreign_function_call(context);
handle_function_end_breakpoint(signal, code, context);
undo_fake_foreign_function_call(context);
break;
case trap_Breakpoint:
sigsetmask(context->sc_mask);
fake_foreign_function_call(context);
handle_breakpoint(signal, code, context);
undo_fake_foreign_function_call(context);
default:
interrupt_handle_now(signal, code, context);
break;
}
break;
case trap_FunctionEndBreakpoint:
sigsetmask(context->sc_mask);
fake_foreign_function_call(context);
handle_function_end_breakpoint(signal, code, context);
undo_fake_foreign_function_call(context);
case 0xBE:
/* Trap Less Than instruction. */
if (SymbolValue(ALLOCATION_POINTER)>SymbolValue(INTERNAL_GC_TRIGGER)) {
SetSymbolValue(INTERNAL_GC_TRIGGER, fixnum(-1));
interrupt_maybe_gc(context);
context->sc_iar += 2;
}
else
interrupt_handle_now(signal, code, context);
break;
default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment