File:  [Research Unix] / researchv10no / cmd / sml / src / runtime / MIPS.dep.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

/* Copyright 1989 by AT&T Bell Laboratories */
/* MIPS.dep.c
 *
 *    MIPS dependent code for SML/NJ runtime kernel.
 */

#include <signal.h>
#include "tags.h"


/* ghandle:
 *    Handler for GC signals.
 */
ghandle(sig,code,scp,addr) int sig, code, addr; struct sigcontext *scp;
{
    saved_pc = scp->sc_pc;
    scp->sc_pc = (int)saveregs;
    if(sig == SIGSEGV)
        cause = CAUSE_GC;
    else {
        fault_code = exnCode(sig,code);
        cause = CAUSE_FAULT;
    }
}


extern int handleprof();

setupsignals ()
{
  struct sigvec a;

  a.sv_handler = (void (*)()) ghandle;
  a.sv_mask	= sigmask(SIGINT);
  a.sv_onstack	= 0;
  a.sv_mask	= 0;
  sigvec(SIGINT,&a,0);
  sigvec(SIGFPE,&a,0);
  a.sv_handler = SIG_IGN;
  sigvec(SIGPIPE,&a,0);
  a.sv_handler = (int (*)()) handleprof;
  sigvec(SIGVTALRM,&a,0);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.