1: /*
   2:  * Copyright (c) 1991, 1993
   3:  *	The Regents of the University of California.  All rights reserved.
   4:  *
   5:  * Redistribution and use in source and binary forms, with or without
   6:  * modification, are permitted provided that the following conditions
   7:  * are met:
   8:  * 1. Redistributions of source code must retain the above copyright
   9:  *    notice, this list of conditions and the following disclaimer.
  10:  * 2. Redistributions in binary form must reproduce the above copyright
  11:  *    notice, this list of conditions and the following disclaimer in the
  12:  *    documentation and/or other materials provided with the distribution.
  13:  * 3. All advertising materials mentioning features or use of this software
  14:  *    must display the following acknowledgement:
  15:  *	This product includes software developed by the University of
  16:  *	California, Berkeley and its contributors.
  17:  * 4. Neither the name of the University nor the names of its contributors
  18:  *    may be used to endorse or promote products derived from this software
  19:  *    without specific prior written permission.
  20:  *
  21:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  22:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  23:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  24:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  25:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  26:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  27:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  28:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  29:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  30:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  31:  * SUCH DAMAGE.
  32:  *
  33:  *	@(#)signalvar.h	8.6.2 (2.11BSD) 1999/9/6
  34:  */
  35: 
  36: #ifndef _SYS_SIGNALVAR_H_       /* tmp for user.h */
  37: #define _SYS_SIGNALVAR_H_
  38: 
  39: /*
  40:  * Kernel signal definitions and data structures,
  41:  * not exported to user programs.
  42:  *
  43:  * For 2BSD the parts that did not apply were cut out.
  44:  */
  45: 
  46: /* signal flags */
  47: #define SAS_OLDMASK 0x01        /* need to restore mask before pause */
  48: #define SAS_ALTSTACK    0x02        /* have alternate signal stack */
  49: 
  50: /* additional signal action values, used only temporarily/internally */
  51: #define SIG_CATCH   (int (*)())2
  52: #define SIG_HOLD    (int (*)())3
  53: 
  54: /*
  55:  * Determine signal that should be delivered to process p, the current
  56:  * process, 0 if none.  If there is a pending stop signal with default
  57:  * action, the process stops in issignal().
  58:  *
  59:  * This probably should be a routine (assembly) instead of a macro due
  60:  * to the voluminous code generated by all of the 'long' operations.
  61:  */
  62: #define CURSIG(p)                       \
  63:     (((p)->p_sig == 0 ||                    \
  64:         (((p)->p_flag & P_TRACED) == 0 &&           \
  65:         ((p)->p_sig & ~(p)->p_sigmask) == 0)) ?     \
  66:         0 : issignal(p))
  67: 
  68: /*
  69:  * Signal properties and actions.
  70:  * The array below categorizes the signals and their default actions
  71:  * according to the following properties:
  72:  */
  73: #define SA_KILL     0x01        /* terminates process by default */
  74: #define SA_CORE     0x02        /* ditto and coredumps */
  75: #define SA_STOP     0x04        /* suspend process */
  76: #define SA_TTYSTOP  0x08        /* ditto, from tty */
  77: #define SA_IGNORE   0x10        /* ignore by default */
  78: #define SA_CONT     0x20        /* continue if suspended */
  79: 
  80: #ifdef  SIGPROP
  81: char sigprop[NSIG + 1] = {
  82:     0,          /* unused */
  83:     SA_KILL,        /* SIGHUP */
  84:     SA_KILL,        /* SIGINT */
  85:     SA_KILL|SA_CORE,    /* SIGQUIT */
  86:     SA_KILL|SA_CORE,    /* SIGILL */
  87:     SA_KILL|SA_CORE,    /* SIGTRAP */
  88:     SA_KILL|SA_CORE,    /* SIGABRT */
  89:     SA_KILL|SA_CORE,    /* SIGEMT */
  90:     SA_KILL|SA_CORE,    /* SIGFPE */
  91:     SA_KILL,        /* SIGKILL */
  92:     SA_KILL|SA_CORE,    /* SIGBUS */
  93:     SA_KILL|SA_CORE,    /* SIGSEGV */
  94:     SA_KILL|SA_CORE,    /* SIGSYS */
  95:     SA_KILL,        /* SIGPIPE */
  96:     SA_KILL,        /* SIGALRM */
  97:     SA_KILL,        /* SIGTERM */
  98:     SA_IGNORE,      /* SIGURG */
  99:     SA_STOP,        /* SIGSTOP */
 100:     SA_STOP|SA_TTYSTOP, /* SIGTSTP */
 101:     SA_IGNORE|SA_CONT,  /* SIGCONT */
 102:     SA_IGNORE,      /* SIGCHLD */
 103:     SA_STOP|SA_TTYSTOP, /* SIGTTIN */
 104:     SA_STOP|SA_TTYSTOP, /* SIGTTOU */
 105:     SA_IGNORE,      /* SIGIO */
 106:     SA_KILL,        /* SIGXCPU */
 107:     SA_KILL,        /* SIGXFSZ */
 108:     SA_KILL,        /* SIGVTALRM */
 109:     SA_KILL,        /* SIGPROF */
 110:     SA_IGNORE,      /* SIGWINCH  */
 111:     SA_IGNORE,      /* SIGINFO */
 112:     SA_KILL,        /* SIGUSR1 */
 113:     SA_KILL,        /* SIGUSR2 */
 114: };
 115: #endif /* SIGPROP */
 116: 
 117: #ifdef  KERNEL
 118: #define contsigmask (sigmask(SIGCONT))
 119: #define stopsigmask (sigmask(SIGSTOP) | sigmask(SIGTSTP) | \
 120:              sigmask(SIGTTIN) | sigmask(SIGTTOU))
 121: #define sigcantmask (sigmask(SIGKILL) | sigmask(SIGSTOP))
 122: #endif
 123: #endif	/* !_SYS_SIGNALVAR_H_ */

Defined variables

Defined macros

CURSIG defined in line 62; used 4 times
SA_CONT defined in line 78; used 6 times
SA_CORE defined in line 74; used 10 times
SA_IGNORE defined in line 77; used 10 times
SA_KILL defined in line 73; used 22 times
SA_STOP defined in line 75; used 8 times
SA_TTYSTOP defined in line 76; used 5 times
SIG_CATCH defined in line 51; used 2 times
SIG_HOLD defined in line 52; used 3 times
_SYS_SIGNALVAR_H_ defined in line 37; used 1 times
  • in line 36
contsigmask defined in line 118; used 1 times
stopsigmask defined in line 119; used 2 times

Usage of this include

Last modified: 1999-09-06
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2984
Valid CSS Valid XHTML 1.0 Strict