Back to home page

OSCL-LXR

 
 

    


0001 #include <linux/signal.h>
0002 
0003 #define SIGUNKNOWN 0
0004 #define MAXMAPPED_SIG 35
0005 #define MAXMAPPED_SIGNAME (MAXMAPPED_SIG + 1)
0006 #define SIGRT_BASE 128
0007 
0008 /* provide a mapping of arch signal to internal signal # for mediation
0009  * those that are always an alias SIGCLD for SIGCLHD and SIGPOLL for SIGIO
0010  * map to the same entry those that may/or may not get a separate entry
0011  */
0012 static const int sig_map[MAXMAPPED_SIG] = {
0013     [0] = MAXMAPPED_SIG,    /* existence test */
0014     [SIGHUP] = 1,
0015     [SIGINT] = 2,
0016     [SIGQUIT] = 3,
0017     [SIGILL] = 4,
0018     [SIGTRAP] = 5,      /* -, 5, - */
0019     [SIGABRT] = 6,      /*  SIGIOT: -, 6, - */
0020     [SIGBUS] = 7,       /* 10, 7, 10 */
0021     [SIGFPE] = 8,
0022     [SIGKILL] = 9,
0023     [SIGUSR1] = 10,     /* 30, 10, 16 */
0024     [SIGSEGV] = 11,
0025     [SIGUSR2] = 12,     /* 31, 12, 17 */
0026     [SIGPIPE] = 13,
0027     [SIGALRM] = 14,
0028     [SIGTERM] = 15,
0029 #ifdef SIGSTKFLT
0030     [SIGSTKFLT] = 16,   /* -, 16, - */
0031 #endif
0032     [SIGCHLD] = 17,     /* 20, 17, 18.  SIGCHLD -, -, 18 */
0033     [SIGCONT] = 18,     /* 19, 18, 25 */
0034     [SIGSTOP] = 19,     /* 17, 19, 23 */
0035     [SIGTSTP] = 20,     /* 18, 20, 24 */
0036     [SIGTTIN] = 21,     /* 21, 21, 26 */
0037     [SIGTTOU] = 22,     /* 22, 22, 27 */
0038     [SIGURG] = 23,      /* 16, 23, 21 */
0039     [SIGXCPU] = 24,     /* 24, 24, 30 */
0040     [SIGXFSZ] = 25,     /* 25, 25, 31 */
0041     [SIGVTALRM] = 26,   /* 26, 26, 28 */
0042     [SIGPROF] = 27,     /* 27, 27, 29 */
0043     [SIGWINCH] = 28,    /* 28, 28, 20 */
0044     [SIGIO] = 29,       /* SIGPOLL: 23, 29, 22 */
0045     [SIGPWR] = 30,      /* 29, 30, 19.  SIGINFO 29, -, - */
0046 #ifdef SIGSYS
0047     [SIGSYS] = 31,      /* 12, 31, 12. often SIG LOST/UNUSED */
0048 #endif
0049 #ifdef SIGEMT
0050     [SIGEMT] = 32,      /* 7, - , 7 */
0051 #endif
0052 #if defined(SIGLOST) && SIGPWR != SIGLOST       /* sparc */
0053     [SIGLOST] = 33,     /* unused on Linux */
0054 #endif
0055 #if defined(SIGUNUSED) && \
0056     defined(SIGLOST) && defined(SIGSYS) && SIGLOST != SIGSYS
0057     [SIGUNUSED] = 34,   /* -, 31, - */
0058 #endif
0059 };
0060 
0061 /* this table is ordered post sig_map[sig] mapping */
0062 static const char *const sig_names[MAXMAPPED_SIGNAME] = {
0063     "unknown",
0064     "hup",
0065     "int",
0066     "quit",
0067     "ill",
0068     "trap",
0069     "abrt",
0070     "bus",
0071     "fpe",
0072     "kill",
0073     "usr1",
0074     "segv",
0075     "usr2",
0076     "pipe",
0077     "alrm",
0078     "term",
0079     "stkflt",
0080     "chld",
0081     "cont",
0082     "stop",
0083     "stp",
0084     "ttin",
0085     "ttou",
0086     "urg",
0087     "xcpu",
0088     "xfsz",
0089     "vtalrm",
0090     "prof",
0091     "winch",
0092     "io",
0093     "pwr",
0094     "sys",
0095     "emt",
0096     "lost",
0097     "unused",
0098 
0099     "exists",   /* always last existence test mapped to MAXMAPPED_SIG */
0100 };
0101