1: /*
   2:  * Copyright (c) 1982, 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	7.1 (Berkeley) 6/4/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: #define SIGKILL 9   /* kill (cannot be caught or ignored) */
  36: #define SIGBUS  10  /* bus error */
  37: #define SIGSEGV 11  /* segmentation violation */
  38: #define SIGSYS  12  /* bad argument to system call */
  39: #define SIGPIPE 13  /* write on a pipe with no one to read it */
  40: #define SIGALRM 14  /* alarm clock */
  41: #define SIGTERM 15  /* software termination signal from kill */
  42: #define SIGURG  16  /* urgent condition on IO channel */
  43: #define SIGSTOP 17  /* sendable stop signal not from tty */
  44: #define SIGTSTP 18  /* stop signal from tty */
  45: #define SIGCONT 19  /* continue a stopped process */
  46: #define SIGCHLD 20  /* to parent on child stop or exit */
  47: #define SIGCLD  SIGCHLD /* compatibility */
  48: #define SIGTTIN 21  /* to readers pgrp upon background tty read */
  49: #define SIGTTOU 22  /* like TTIN for output if (tp->t_local&LTOSTOP) */
  50: #define SIGIO   23  /* input/output possible signal */
  51: #define SIGXCPU 24  /* exceeded CPU time limit */
  52: #define SIGXFSZ 25  /* exceeded file size limit */
  53: #define SIGVTALRM 26    /* virtual time alarm */
  54: #define SIGPROF 27  /* profiling time alarm */
  55: #define SIGWINCH 28 /* window size changes */
  56: #define SIGUSR1 30  /* user defined signal 1 */
  57: #define SIGUSR2 31  /* user defined signal 2 */
  58: 
  59: #ifndef KERNEL
  60: int (*signal())();
  61: #endif
  62: 
  63: /*
  64:  * Signal vector "template" used in sigvec call.
  65:  */
  66: struct  sigvec {
  67:     int (*sv_handler)();    /* signal handler */
  68:     int sv_mask;        /* signal mask to apply */
  69:     int sv_flags;       /* see signal options below */
  70: };
  71: #define SV_ONSTACK  0x0001  /* take signal on signal stack */
  72: #define SV_INTERRUPT    0x0002  /* do not restart system on signal return */
  73: #define sv_onstack sv_flags /* isn't compatibility wonderful! */
  74: 
  75: /*
  76:  * Structure used in sigstack call.
  77:  */
  78: struct  sigstack {
  79:     char    *ss_sp;         /* signal stack pointer */
  80:     int ss_onstack;     /* current status */
  81: };
  82: 
  83: /*
  84:  * Information pushed on stack when a signal is delivered.
  85:  * This is used by the kernel to restore state following
  86:  * execution of the signal handler.  It is also made available
  87:  * to the handler to allow it to properly restore state if
  88:  * a non-standard exit is performed.
  89:  */
  90: struct  sigcontext {
  91:     int sc_onstack;     /* sigstack state to restore */
  92:     int sc_mask;        /* signal mask to restore */
  93:     int sc_sp;          /* sp to restore */
  94:     int sc_fp;          /* fp to restore */
  95:     int sc_ap;          /* ap to restore */
  96:     int sc_pc;          /* pc to restore */
  97:     int sc_ps;          /* psl to restore */
  98: };
  99: 
 100: #define BADSIG      (int (*)())-1
 101: #define SIG_DFL     (int (*)())0
 102: #define SIG_IGN     (int (*)())1
 103: 
 104: #ifdef KERNEL
 105: #define SIG_CATCH   (int (*)())2
 106: #define SIG_HOLD    (int (*)())3
 107: #endif
 108: #endif
 109: 
 110: /*
 111:  * Macro for converting signal number to a mask suitable for
 112:  * sigblock().
 113:  */
 114: #define sigmask(m)  (1 << ((m)-1))

Defined struct's

sigcontext defined in line 90; never used
sigstack defined in line 78; never used
sigvec defined in line 66; never used

Defined macros

BADSIG defined in line 100; never used
FPE_DECOVF_TRAP defined in line 30; never used
FPE_FLTDIV_FAULT defined in line 33; never used
FPE_FLTDIV_TRAP defined in line 28; never used
FPE_FLTOVF_FAULT defined in line 32; never used
FPE_FLTOVF_TRAP defined in line 27; never used
FPE_FLTUND_FAULT defined in line 34; never used
FPE_FLTUND_TRAP defined in line 29; never used
FPE_INTDIV_TRAP defined in line 26; never used
FPE_INTOVF_TRAP defined in line 25; never used
FPE_SUBRNG_TRAP defined in line 31; never used
ILL_PRIVIN_FAULT defined in line 17; never used
ILL_RESAD_FAULT defined in line 16; never used
ILL_RESOP_FAULT defined in line 18; never used
NSIG defined in line 10; used 1 times
  • in line 9
SIGABRT defined in line 22; never used
SIGALRM defined in line 40; never used
SIGBUS defined in line 36; never used
SIGCHLD defined in line 46; used 1 times
  • in line 47
SIGCLD defined in line 47; never used
SIGCONT defined in line 45; never used
SIGEMT defined in line 23; never used
SIGFPE defined in line 24; never used
SIGHUP defined in line 12; never used
SIGILL defined in line 15; never used
SIGINT defined in line 13; never used
SIGIO defined in line 50; never used
SIGIOT defined in line 21; used 1 times
  • in line 22
SIGKILL defined in line 35; never used
SIGPIPE defined in line 39; never used
SIGPROF defined in line 54; never used
SIGQUIT defined in line 14; never used
SIGSEGV defined in line 37; never used
SIGSTOP defined in line 43; never used
SIGSYS defined in line 38; never used
SIGTERM defined in line 41; never used
SIGTRAP defined in line 20; never used
SIGTSTP defined in line 44; never used
SIGTTIN defined in line 48; never used
SIGTTOU defined in line 49; never used
SIGURG defined in line 42; never used
SIGUSR1 defined in line 56; never used
SIGUSR2 defined in line 57; never used
SIGVTALRM defined in line 53; never used
SIGWINCH defined in line 55; never used
SIGXCPU defined in line 51; never used
SIGXFSZ defined in line 52; never used
SIG_CATCH defined in line 105; never used
SIG_DFL defined in line 101; never used
SIG_HOLD defined in line 106; never used
SIG_IGN defined in line 102; never used
SV_INTERRUPT defined in line 72; never used
SV_ONSTACK defined in line 71; never used
sigmask defined in line 114; never used
sv_onstack defined in line 73; never used
Last modified: 1986-06-05
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1436
Valid CSS Valid XHTML 1.0 Strict