Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 #ifndef _UAPI_ASM_POWERPC_SIGNAL_H
0003 #define _UAPI_ASM_POWERPC_SIGNAL_H
0004 
0005 #include <linux/types.h>
0006 
0007 #define _NSIG       64
0008 #ifdef __powerpc64__
0009 #define _NSIG_BPW   64
0010 #else
0011 #define _NSIG_BPW   32
0012 #endif
0013 #define _NSIG_WORDS (_NSIG / _NSIG_BPW)
0014 
0015 typedef unsigned long old_sigset_t;     /* at least 32 bits */
0016 
0017 typedef struct {
0018     unsigned long sig[_NSIG_WORDS];
0019 } sigset_t;
0020 
0021 #define SIGHUP       1
0022 #define SIGINT       2
0023 #define SIGQUIT      3
0024 #define SIGILL       4
0025 #define SIGTRAP      5
0026 #define SIGABRT      6
0027 #define SIGIOT       6
0028 #define SIGBUS       7
0029 #define SIGFPE       8
0030 #define SIGKILL      9
0031 #define SIGUSR1     10
0032 #define SIGSEGV     11
0033 #define SIGUSR2     12
0034 #define SIGPIPE     13
0035 #define SIGALRM     14
0036 #define SIGTERM     15
0037 #define SIGSTKFLT   16
0038 #define SIGCHLD     17
0039 #define SIGCONT     18
0040 #define SIGSTOP     19
0041 #define SIGTSTP     20
0042 #define SIGTTIN     21
0043 #define SIGTTOU     22
0044 #define SIGURG      23
0045 #define SIGXCPU     24
0046 #define SIGXFSZ     25
0047 #define SIGVTALRM   26
0048 #define SIGPROF     27
0049 #define SIGWINCH    28
0050 #define SIGIO       29
0051 #define SIGPOLL     SIGIO
0052 /*
0053 #define SIGLOST     29
0054 */
0055 #define SIGPWR      30
0056 #define SIGSYS      31
0057 #define SIGUNUSED   31
0058 
0059 /* These should not be considered constants from userland.  */
0060 #define SIGRTMIN    32
0061 #define SIGRTMAX    _NSIG
0062 
0063 #define SA_RESTORER 0x04000000U
0064 
0065 #ifdef __powerpc64__
0066 #define MINSIGSTKSZ 8192
0067 #define SIGSTKSZ    32768
0068 #else
0069 #define MINSIGSTKSZ 2048
0070 #define SIGSTKSZ    8192
0071 #endif
0072 
0073 #include <asm-generic/signal-defs.h>
0074 
0075 #ifndef __KERNEL__
0076 struct old_sigaction {
0077     __sighandler_t sa_handler;
0078     old_sigset_t sa_mask;
0079     unsigned long sa_flags;
0080     __sigrestore_t sa_restorer;
0081 };
0082 
0083 struct sigaction {
0084     __sighandler_t sa_handler;
0085     unsigned long sa_flags;
0086     __sigrestore_t sa_restorer;
0087     sigset_t sa_mask;       /* mask last for extensibility */
0088 };
0089 #endif
0090 
0091 typedef struct sigaltstack {
0092     void __user *ss_sp;
0093     int ss_flags;
0094     __kernel_size_t ss_size;
0095 } stack_t;
0096 
0097 
0098 #ifndef __powerpc64__
0099 /*
0100  * These are parameters to dbg_sigreturn syscall.  They enable or
0101  * disable certain debugging things that can be done from signal
0102  * handlers.  The dbg_sigreturn syscall *must* be called from a
0103  * SA_SIGINFO signal so the ucontext can be passed to it.  It takes an
0104  * array of struct sig_dbg_op, which has the debug operations to
0105  * perform before returning from the signal.
0106  */
0107 struct sig_dbg_op {
0108     int dbg_type;
0109     unsigned long dbg_value;
0110 };
0111 
0112 /* Enable or disable single-stepping.  The value sets the state. */
0113 #define SIG_DBG_SINGLE_STEPPING     1
0114 
0115 /* Enable or disable branch tracing.  The value sets the state. */
0116 #define SIG_DBG_BRANCH_TRACING      2
0117 #endif /* ! __powerpc64__ */
0118 
0119 #endif /* _UAPI_ASM_POWERPC_SIGNAL_H */