|
|
1.1 root 1: /* Copyright 1989 by AT&T Bell Laboratories */
2: /* MIPS.dep.c
3: *
4: * MIPS dependent code for SML/NJ runtime kernel.
5: */
6:
7: #include <signal.h>
8: #include "tags.h"
9:
10:
11: /* ghandle:
12: * Handler for GC signals.
13: */
14: ghandle(sig,code,scp,addr) int sig, code, addr; struct sigcontext *scp;
15: {
16: saved_pc = scp->sc_pc;
17: scp->sc_pc = (int)saveregs;
18: if(sig == SIGSEGV)
19: cause = CAUSE_GC;
20: else {
21: fault_code = exnCode(sig,code);
22: cause = CAUSE_FAULT;
23: }
24: }
25:
26:
27: extern int handleprof();
28:
29: setupsignals ()
30: {
31: struct sigvec a;
32:
33: a.sv_handler = (void (*)()) ghandle;
34: a.sv_mask = sigmask(SIGINT);
35: a.sv_onstack = 0;
36: a.sv_mask = 0;
37: sigvec(SIGINT,&a,0);
38: sigvec(SIGFPE,&a,0);
39: a.sv_handler = SIG_IGN;
40: sigvec(SIGPIPE,&a,0);
41: a.sv_handler = (int (*)()) handleprof;
42: sigvec(SIGVTALRM,&a,0);
43: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.