155126Storek /* 255126Storek * Copyright (c) 1992 The Regents of the University of California. 355126Storek * All rights reserved. 455126Storek * 555126Storek * This software was developed by the Computer Systems Engineering group 655126Storek * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 755126Storek * contributed to Berkeley. 855126Storek * 955501Sbostic * All advertising materials mentioning features or use of this software 1055501Sbostic * must display the following acknowledgement: 1155501Sbostic * This product includes software developed by the University of 1259210Storek * California, Lawrence Berkeley Laboratory. 1355501Sbostic * 1455126Storek * %sccs.include.redist.c% 1555126Storek * 16*60072Storek * @(#)signal.h 7.4 (Berkeley) 05/16/93 1755126Storek * 1859210Storek * from: $Header: signal.h,v 1.5 92/11/26 02:04:46 torek Exp $ 1955126Storek */ 2055126Storek 2155126Storek #ifndef LOCORE 22*60072Storek typedef int sig_atomic_t; 23*60072Storek 2455126Storek /* 2555126Storek * Information pushed on stack when a signal is delivered. 2655126Storek * This is used by the kernel to restore state following 2755126Storek * execution of the signal handler. It is also made available 2855126Storek * to the handler to allow it to restore state properly if 2955126Storek * a non-standard exit is performed. 3055126Storek * 3155126Storek * All machines must have an sc_onstack and sc_mask. 3255126Storek */ 3355126Storek struct sigcontext { 3455126Storek int sc_onstack; /* sigstack state to restore */ 3555126Storek int sc_mask; /* signal mask to restore */ 3655126Storek /* begin machine dependent portion */ 3755126Storek int sc_sp; /* %sp to restore */ 3855126Storek int sc_pc; /* pc to restore */ 3955126Storek int sc_npc; /* npc to restore */ 4055126Storek int sc_psr; /* psr to restore */ 4155126Storek int sc_g1; /* %g1 to restore */ 4255126Storek int sc_o0; /* %o0 to restore */ 4355126Storek }; 4455126Storek #else /* LOCORE */ 4555126Storek #define SC_SP_OFFSET 8 4655126Storek #define SC_PC_OFFSET 12 4755126Storek #define SC_NPC_OFFSET 16 4855126Storek #define SC_PSR_OFFSET 20 4955126Storek #define SC_G1_OFFSET 24 5055126Storek #define SC_O0_OFFSET 28 5155126Storek #endif /* LOCORE */ 5255126Storek 5355126Storek /* 5455126Storek * `Code' arguments to signal handlers. The names, and the funny numbering. 5555126Storek * are defined so as to match up with what SunOS uses; I have no idea why 5655126Storek * they did the numbers that way, except maybe to match up with the 68881. 5755126Storek */ 5855126Storek #define FPE_INTOVF_TRAP 0x01 /* integer overflow */ 5955126Storek #define FPE_INTDIV_TRAP 0x14 /* integer divide by zero */ 6055126Storek #define FPE_FLTINEX_TRAP 0xc4 /* inexact */ 6155126Storek #define FPE_FLTDIV_TRAP 0xc8 /* divide by zero */ 6255126Storek #define FPE_FLTUND_TRAP 0xcc /* underflow */ 6355126Storek #define FPE_FLTOPERR_TRAP 0xd0 /* operand error */ 6455126Storek #define FPE_FLTOVF_TRAP 0xd4 /* overflow */ 65