Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 /*
0003  * This file is subject to the terms and conditions of the GNU General Public
0004  * License.  See the file "COPYING" in the main directory of this archive
0005  * for more details.
0006  *
0007  * Copyright (C) 1995, 96, 97, 98, 99, 2003 by Ralf Baechle
0008  * Copyright (C) 1999 Silicon Graphics, Inc.
0009  */
0010 #ifndef _UAPI_ASM_SIGNAL_H
0011 #define _UAPI_ASM_SIGNAL_H
0012 
0013 #include <linux/types.h>
0014 
0015 #define _NSIG       128
0016 #define _NSIG_BPW   (sizeof(unsigned long) * 8)
0017 #define _NSIG_WORDS (_NSIG / _NSIG_BPW)
0018 
0019 typedef struct {
0020     unsigned long sig[_NSIG_WORDS];
0021 } sigset_t;
0022 
0023 typedef unsigned long old_sigset_t;     /* at least 32 bits */
0024 
0025 #define SIGHUP       1  /* Hangup (POSIX).  */
0026 #define SIGINT       2  /* Interrupt (ANSI).  */
0027 #define SIGQUIT      3  /* Quit (POSIX).  */
0028 #define SIGILL       4  /* Illegal instruction (ANSI).  */
0029 #define SIGTRAP      5  /* Trace trap (POSIX).  */
0030 #define SIGIOT       6  /* IOT trap (4.2 BSD).  */
0031 #define SIGABRT      SIGIOT /* Abort (ANSI).  */
0032 #define SIGEMT       7
0033 #define SIGFPE       8  /* Floating-point exception (ANSI).  */
0034 #define SIGKILL      9  /* Kill, unblockable (POSIX).  */
0035 #define SIGBUS      10  /* BUS error (4.2 BSD).  */
0036 #define SIGSEGV     11  /* Segmentation violation (ANSI).  */
0037 #define SIGSYS      12
0038 #define SIGPIPE     13  /* Broken pipe (POSIX).  */
0039 #define SIGALRM     14  /* Alarm clock (POSIX).  */
0040 #define SIGTERM     15  /* Termination (ANSI).  */
0041 #define SIGUSR1     16  /* User-defined signal 1 (POSIX).  */
0042 #define SIGUSR2     17  /* User-defined signal 2 (POSIX).  */
0043 #define SIGCHLD     18  /* Child status has changed (POSIX).  */
0044 #define SIGCLD      SIGCHLD /* Same as SIGCHLD (System V).  */
0045 #define SIGPWR      19  /* Power failure restart (System V).  */
0046 #define SIGWINCH    20  /* Window size change (4.3 BSD, Sun).  */
0047 #define SIGURG      21  /* Urgent condition on socket (4.2 BSD).  */
0048 #define SIGIO       22  /* I/O now possible (4.2 BSD).  */
0049 #define SIGPOLL     SIGIO   /* Pollable event occurred (System V).  */
0050 #define SIGSTOP     23  /* Stop, unblockable (POSIX).  */
0051 #define SIGTSTP     24  /* Keyboard stop (POSIX).  */
0052 #define SIGCONT     25  /* Continue (POSIX).  */
0053 #define SIGTTIN     26  /* Background read from tty (POSIX).  */
0054 #define SIGTTOU     27  /* Background write to tty (POSIX).  */
0055 #define SIGVTALRM   28  /* Virtual alarm clock (4.2 BSD).  */
0056 #define SIGPROF     29  /* Profiling alarm clock (4.2 BSD).  */
0057 #define SIGXCPU     30  /* CPU limit exceeded (4.2 BSD).  */
0058 #define SIGXFSZ     31  /* File size limit exceeded (4.2 BSD).  */
0059 
0060 /* These should not be considered constants from userland.  */
0061 #define SIGRTMIN    32
0062 #define SIGRTMAX    _NSIG
0063 
0064 /*
0065  * SA_RESTORER used to be defined as 0x04000000 but only the O32 ABI ever
0066  * supported its use and no libc was using it, so the entire sa-restorer
0067  * functionality was removed with lmo commit 39bffc12c3580ab for 2.5.48
0068  * retaining only the SA_RESTORER definition as a reminder to avoid
0069  * accidental reuse of the mask bit.
0070  */
0071 #define SA_ONSTACK  0x08000000
0072 #define SA_RESETHAND    0x80000000
0073 #define SA_RESTART  0x10000000
0074 #define SA_SIGINFO  0x00000008
0075 #define SA_NODEFER  0x40000000
0076 #define SA_NOCLDWAIT    0x00010000
0077 #define SA_NOCLDSTOP    0x00000001
0078 
0079 #define SA_NOMASK   SA_NODEFER
0080 #define SA_ONESHOT  SA_RESETHAND
0081 
0082 #define MINSIGSTKSZ    2048
0083 #define SIGSTKSZ       8192
0084 
0085 
0086 #define SIG_BLOCK   1   /* for blocking signals */
0087 #define SIG_UNBLOCK 2   /* for unblocking signals */
0088 #define SIG_SETMASK 3   /* for setting the signal mask */
0089 
0090 #include <asm-generic/signal-defs.h>
0091 
0092 #ifndef __KERNEL__
0093 struct sigaction {
0094     unsigned int    sa_flags;
0095     __sighandler_t  sa_handler;
0096     sigset_t    sa_mask;
0097 };
0098 #endif
0099 
0100 /* IRIX compatible stack_t  */
0101 typedef struct sigaltstack {
0102     void __user *ss_sp;
0103     __kernel_size_t ss_size;
0104     int ss_flags;
0105 } stack_t;
0106 
0107 
0108 #endif /* _UAPI_ASM_SIGNAL_H */