/*-=-=-=-=-=-=-=-=-=-=-=- RCCL/RCI Notice of Copyright -=-=-=-=-=-=-=-=-=-=-*
 *									    *
 *	Copyright (C) 1987, 1991 by Mike Parker.			    *
 *									    *
 *	Information on copyright permissions, as well as a complete	    *
 *	disclaimer of warranty, is given in the file COPYRIGHT.		    *
 *									    *
 *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

#include <vax/mtpr.h>

#include "sirr.h"

int uentry;
int uarg;

clearslave()
{
 splhigh();
 init_sig_handlers();
 init_ast();
 init_timers();
 clearmem();
 inituserpt();
 force_exit();
}

force_exit()
{
 mtpr(SIRR,SIR_EXIT);
}

main()
{
 splhigh();
 initmem();
 inituserpt();
 uentry = 0;
 while (1)
  { mtpr(TBIA,0);
    spl0();
    if (uentry)
     { int i;
       i = uentry;
       uentry = 0;
       setuserstack(512);
       resetuserstack();
       usercall(i,uarg);
     }
  }
}
