Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


signal.h
001: #ifndef _ASM_X86_SIGNAL_H
002: #define _ASM_X86_SIGNAL_H
003: 
004: #ifndef __ASSEMBLY__
005: #include <linux/types.h>
006: #include <linux/time.h>
007: 
008: 
009: /* Avoid too many header ordering problems.  */
010: struct siginfo;
011: 
012: /* Here we must cater to libcs that poke about in kernel headers.  */
013: 
014: #define NSIG            32
015: typedef unsigned long sigset_t;
016: 
017: #endif /* __ASSEMBLY__ */
018: 
019: #define SIGHUP           1
020: #define SIGINT           2
021: #define SIGQUIT          3
022: #define SIGILL           4
023: #define SIGTRAP          5
024: #define SIGABRT          6
025: #define SIGIOT           6
026: #define SIGBUS           7
027: #define SIGFPE           8
028: #define SIGKILL          9
029: #define SIGUSR1         10
030: #define SIGSEGV         11
031: #define SIGUSR2         12
032: #define SIGPIPE         13
033: #define SIGALRM         14
034: #define SIGTERM         15
035: #define SIGSTKFLT       16
036: #define SIGCHLD         17
037: #define SIGCONT         18
038: #define SIGSTOP         19
039: #define SIGTSTP         20
040: #define SIGTTIN         21
041: #define SIGTTOU         22
042: #define SIGURG          23
043: #define SIGXCPU         24
044: #define SIGXFSZ         25
045: #define SIGVTALRM       26
046: #define SIGPROF         27
047: #define SIGWINCH        28
048: #define SIGIO           29
049: #define SIGPOLL         SIGIO
050: /*
051: #define SIGLOST         29
052: */
053: #define SIGPWR          30
054: #define SIGSYS          31
055: #define SIGUNUSED       31
056: 
057: /* These should not be considered constants from userland.  */
058: #define SIGRTMIN        32
059: #define SIGRTMAX        _NSIG
060: 
061: /*
062:  * SA_FLAGS values:
063:  *
064:  * SA_ONSTACK indicates that a registered stack_t will be used.
065:  * SA_RESTART flag to get restarting signals (which were the default long ago)
066:  * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
067:  * SA_RESETHAND clears the handler when the signal is delivered.
068:  * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
069:  * SA_NODEFER prevents the current signal from being masked in the handler.
070:  *
071:  * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
072:  * Unix names RESETHAND and NODEFER respectively.
073:  */
074: #define SA_NOCLDSTOP    0x00000001u
075: #define SA_NOCLDWAIT    0x00000002u
076: #define SA_SIGINFO      0x00000004u
077: #define SA_ONSTACK      0x08000000u
078: #define SA_RESTART      0x10000000u
079: #define SA_NODEFER      0x40000000u
080: #define SA_RESETHAND    0x80000000u
081: 
082: #define SA_NOMASK       SA_NODEFER
083: #define SA_ONESHOT      SA_RESETHAND
084: 
085: #define SA_RESTORER     0x04000000
086: 
087: /*
088:  * sigaltstack controls
089:  */
090: #define SS_ONSTACK      1
091: #define SS_DISABLE      2
092: 
093: #define MINSIGSTKSZ     2048
094: #define SIGSTKSZ        8192
095: 
096: #include <asm-generic/signal-defs.h>
097: 
098: #ifndef __ASSEMBLY__
099: 
100: 
101: #ifdef __i386__
102: /* Here we must cater to libcs that poke about in kernel headers.  */
103: 
104: struct sigaction {
105:         union {
106:           __sighandler_t _sa_handler;
107:           void (*_sa_sigaction)(int, struct siginfo *, void *);
108:         } _u;
109:         sigset_t sa_mask;
110:         unsigned long sa_flags;
111:         void (*sa_restorer)(void);
112: };
113: 
114: #define sa_handler      _u._sa_handler
115: #define sa_sigaction    _u._sa_sigaction
116: 
117: #else /* __i386__ */
118: 
119: struct sigaction {
120:         __sighandler_t sa_handler;
121:         unsigned long sa_flags;
122:         __sigrestore_t sa_restorer;
123:         sigset_t sa_mask;               /* mask last for extensibility */
124: };
125: 
126: struct k_sigaction {
127:         struct sigaction sa;
128: };
129: 
130: #endif /* !__i386__ */
131: 
132: typedef struct sigaltstack {
133:         void *ss_sp;
134:         int ss_flags;
135:         size_t ss_size;
136: } stack_t;
137: 
138: #endif /* __ASSEMBLY__ */
139: 
140: #endif /* _ASM_X86_SIGNAL_H */
141: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/