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&LTOSTOP) */
  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

sigcontext defined in line 96; never used
sigstack defined in line 84; never used
sigvec defined in line 72; never used

Defined macros

BADSIG defined in line 108; never used
FPE_CRAZY defined in line 36; 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_MAINT_TRAP defined in line 39; never used
FPE_OPCODE_TRAP defined in line 37; never used
FPE_OPERAND_TRAP defined in line 38; 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 46; never used
SIGBUS defined in line 42; never used
SIGCHLD defined in line 52; used 1 times
  • in line 53
SIGCLD defined in line 53; never used
SIGCONT defined in line 51; 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 56; never used
SIGIOT defined in line 21; used 1 times
  • in line 22
SIGKILL defined in line 41; never used
SIGPIPE defined in line 45; never used
SIGPROF defined in line 60; never used
SIGQUIT defined in line 14; never used
SIGSEGV defined in line 43; never used
SIGSTOP defined in line 49; never used
SIGSYS defined in line 44; never used
SIGTERM defined in line 47; never used
SIGTRAP defined in line 20; never used
SIGTSTP defined in line 50; never used
SIGTTIN defined in line 54; never used
SIGTTOU defined in line 55; never used
SIGURG defined in line 48; never used
SIGUSR1 defined in line 62; never used
SIGUSR2 defined in line 63; never used
SIGVTALRM defined in line 59; never used
SIGWINCH defined in line 61; never used
SIGXCPU defined in line 57; never used
SIGXFSZ defined in line 58; never used
SIG_CATCH defined in line 113; never used
SIG_DFL defined in line 109; never used
SIG_HOLD defined in line 114; never used
SIG_IGN defined in line 110; never used
SV_INTERRUPT defined in line 78; never used
SV_ONSTACK defined in line 77; never used
sigmask defined in line 122; never used
sv_onstack defined in line 79; never used
Last modified: 1987-05-16
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 3232
Valid CSS Valid XHTML 1.0 Strict