Annotation of 43BSD/sys/h/signal.h, revision 1.1.1.1

1.1       root        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))

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.