1: /*
2: * Copyright (c) 1986 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: *
6: * @(#)signal.h 1.1 (2.10BSD Berkeley) 12/1/86
7: */
8:
9: #ifndef NSIG
10: #define NSIG 32
11:
12: #define SIGHUP 1 /* hangup */
13: #define SIGINT 2 /* interrupt */
14: #define SIGQUIT 3 /* quit */
15: #define SIGILL 4 /* illegal instruction (not reset when caught) */
16: #define ILL_RESAD_FAULT 0x0 /* reserved addressing fault */
17: #define ILL_PRIVIN_FAULT 0x1 /* privileged instruction fault */
18: #define ILL_RESOP_FAULT 0x2 /* reserved operand fault */
19: /* CHME, CHMS, CHMU are not yet given back to users reasonably */
20: #define SIGTRAP 5 /* trace trap (not reset when caught) */
21: #define SIGIOT 6 /* IOT instruction */
22: #define SIGABRT SIGIOT /* compatibility */
23: #define SIGEMT 7 /* EMT instruction */
24: #define SIGFPE 8 /* floating point exception */
25: #define FPE_INTOVF_TRAP 0x1 /* integer overflow */
26: #define FPE_INTDIV_TRAP 0x2 /* integer divide by zero */
27: #define FPE_FLTOVF_TRAP 0x3 /* floating overflow */
28: #define FPE_FLTDIV_TRAP 0x4 /* floating/decimal divide by zero */
29: #define FPE_FLTUND_TRAP 0x5 /* floating underflow */
30: #define FPE_DECOVF_TRAP 0x6 /* decimal overflow */
31: #define FPE_SUBRNG_TRAP 0x7 /* subscript out of range */
32: #define FPE_FLTOVF_FAULT 0x8 /* floating overflow fault */
33: #define FPE_FLTDIV_FAULT 0x9 /* divide by zero floating fault */
34: #define FPE_FLTUND_FAULT 0xa /* floating underflow fault */
35: #ifdef pdp11
36: #define FPE_CRAZY 0xb /* illegal return code - FPU crazy */
37: #define FPE_OPCODE_TRAP 0xc /* bad floating point op code */
38: #define FPE_OPERAND_TRAP 0xd /* bad floating point operand */
39: #define FPE_MAINT_TRAP 0xe /* maintenance trap */
40: #endif
41: #define SIGKILL 9 /* kill (cannot be caught or ignored) */
42: #define SIGBUS 10 /* bus error */
43: #define SIGSEGV 11 /* segmentation violation */
44: #define SIGSYS 12 /* bad argument to system call */
45: #define SIGPIPE 13 /* write on a pipe with no one to read it */
46: #define SIGALRM 14 /* alarm clock */
47: #define SIGTERM 15 /* software termination signal from kill */
48: #define SIGURG 16 /* urgent condition on IO channel */
49: #define SIGSTOP 17 /* sendable stop signal not from tty */
50: #define SIGTSTP 18 /* stop signal from tty */
51: #define SIGCONT 19 /* continue a stopped process */
52: #define SIGCHLD 20 /* to parent on child stop or exit */
53: #define SIGCLD SIGCHLD /* compatibility */
54: #define SIGTTIN 21 /* to readers pgrp upon background tty read */
55: #define SIGTTOU 22 /* like TTIN for output if (tp->t_local<OSTOP) */
56: #define SIGIO 23 /* input/output possible signal */
57: #define SIGXCPU 24 /* exceeded CPU time limit */
58: #define SIGXFSZ 25 /* exceeded file size limit */
59: #define SIGVTALRM 26 /* virtual time alarm */
60: #define SIGPROF 27 /* profiling time alarm */
61: #define SIGWINCH 28 /* window size changes */
62: #define SIGUSR1 30 /* user defined signal 1 */
63: #define SIGUSR2 31 /* user defined signal 2 */
64:
65: #ifndef KERNEL
66: int (*signal())();
67: #endif
68:
69: /*
70: * Signal vector "template" used in sigvec call.
71: */
72: struct sigvec {
73: int (*sv_handler)(); /* signal handler */
74: long sv_mask; /* signal mask to apply */
75: int sv_flags; /* see signal options below */
76: };
77: #define SV_ONSTACK 0x0001 /* take signal on signal stack */
78: #define SV_INTERRUPT 0x0002 /* do not restart system on signal return */
79: #define sv_onstack sv_flags /* isn't compatibility wonderful! */
80:
81: /*
82: * Structure used in sigstack call.
83: */
84: struct sigstack {
85: char *ss_sp; /* signal stack pointer */
86: int ss_onstack; /* current status */
87: };
88:
89: /*
90: * Information pushed on stack when a signal is delivered.
91: * This is used by the kernel to restore state following
92: * execution of the signal handler. It is also made available
93: * to the handler to allow it to properly restore state if
94: * a non-standard exit is performed.
95: */
96: struct sigcontext {
97: int sc_onstack; /* sigstack state to restore */
98: long sc_mask; /* signal mask to restore */
99: int sc_sp; /* sp to restore */
100: int sc_fp; /* fp to restore */
101: int sc_r1; /* r1 to restore */
102: int sc_r0; /* r0 to restore */
103: int sc_pc; /* pc to restore */
104: int sc_ps; /* psl to restore */
105: int sc_ovno /* overlay to restore */
106: };
107:
108: #define BADSIG (int (*)())-1
109: #define SIG_DFL (int (*)())0
110: #define SIG_IGN (int (*)())1
111:
112: #ifdef KERNEL
113: #define SIG_CATCH (int (*)())2
114: #define SIG_HOLD (int (*)())3
115: #endif
116: #endif
117:
118: /*
119: * Macro for converting signal number to a mask suitable for
120: * sigblock().
121: */
122: #define sigmask(m) ((long)1 << ((m)-1))
123:
124: #ifndef KERNEL
125: extern long sigblock(), sigsetmask();
126: #endif
Defined struct's
Defined macros
NSIG
defined in line
10; used 1 times
SIGIO
defined in line
56;
never used