# 2.11BSD#431 - /usr/src/sys/h/signalvar.h

##### Variables

    sigprop           X

##### Macros

    CURSIG            X
    SAS_ALTSTACK      X
    SAS_OLDMASK       X
    SA_CONT           X
    SA_CORE           X
    SA_IGNORE         X
    SA_KILL           X
    SA_STOP           X
    SA_TTYSTOP        X
    SIG_CATCH         X
    SIG_HOLD          X
    _SYS_SIGNALVAR_H_ X
    contsigmask       X
    sigcantmask       X
    stopsigmask       X

       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

sigprop defined in line 81; used 7 times

- in /usr/src/sys/sys/kern_exec.c line 411
- in /usr/src/sys/sys/kern_sig.c line 217, 412, 467, 599
- in /usr/src/sys/sys/kern_sig2.c line 152, 198

#### Defined macros

CURSIG defined in line 62; used 4 times

- in /usr/src/sys/pdp/trap.c line 301, 376
- in /usr/src/sys/sys/kern_synch.c line 158, 187

SAS_ALTSTACK defined in line 48; used 5 times

- in /usr/src/sys/pdp/machdep.c line 69
- in /usr/src/sys/sys/kern_sig.c line 79
- in /usr/src/sys/sys/kern_sig2.c line 315, 330, 339

SAS_OLDMASK defined in line 47; used 4 times

- in /usr/src/sys/sys/kern_sig.c line 587-589(2)
- in /usr/src/sys/sys/kern_sig2.c line 297
- in /usr/src/sys/sys/sys_generic.c line 423

SA_CONT defined in line 78; used 6 times

- in line 101
- in /usr/src/sys/sys/kern_sig.c line 243, 263, 289, 326, 521

SA_CORE defined in line 74; used 10 times

- in line 85-94(9)
- in /usr/src/sys/sys/kern_sig.c line 599

SA_IGNORE defined in line 77; used 10 times

- in line 98-111(6)
- in /usr/src/sys/sys/kern_exec.c line 411
- in /usr/src/sys/sys/kern_sig.c line 505
- in /usr/src/sys/sys/kern_sig2.c line 152, 198

SA_KILL defined in line 73; used 22 times

- in line 83-97(15), 106-113(6)
- in /usr/src/sys/sys/kern_sig.c line 239

SA_STOP defined in line 75; used 8 times

- in line 99-104(4)
- in /usr/src/sys/sys/kern_sig.c line 246, 299, 345, 494

SA_TTYSTOP defined in line 76; used 5 times

- in line 100-104(3)
- in /usr/src/sys/sys/kern_sig.c line 253, 497

SIG_CATCH defined in line 51; used 2 times

- in /usr/src/sys/sys/kern_sig.c line 234, 339

SIG_HOLD defined in line 52; used 3 times

- in /usr/src/sys/pdp/trap.c line 397
- in /usr/src/sys/sys/kern_sig.c line 232, 263

_SYS_SIGNALVAR_H_ defined in line 37; used 1 times

- in line 36

contsigmask defined in line 118; used 1 times

- in /usr/src/sys/sys/kern_sig.c line 256

sigcantmask defined in line 121; used 8 times

- in /usr/src/sys/pdp/machdep.c line 150
- in /usr/src/sys/sys/kern_sig2.c line 130, 231, 237, 298, 364-368(2)
- in /usr/src/sys/sys/sys_generic.c line 355

stopsigmask defined in line 119; used 2 times

- in /usr/src/sys/sys/kern_sig.c line 244, 407

#### Usage of this include

signalvar.h used 8 times

- in /usr/src/sys/pdp/machdep.c line 13
- in /usr/src/sys/pdp/trap.c line 16
- in /usr/src/sys/sys/kern_exec.c line 25
- in /usr/src/sys/sys/kern_sig.c line 18
- in /usr/src/sys/sys/kern_sig2.c line 52
- in /usr/src/sys/sys/kern_synch.c line 16
- in /usr/src/sys/sys/sys_generic.c line 14
- in /usr/src/sys/sys/sys_inode.c line 14

Last modified: 1999-09-06 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 709 |