Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _ASM_SIGNAL_H |
| 2 | #define _ASM_SIGNAL_H |
| 3 | |
| 4 | #include <linux/types.h> |
| 5 | |
David Howells | 5c55b40 | 2009-06-13 13:23:54 +0100 | [diff] [blame] | 6 | #ifndef __KERNEL__ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | /* Here we must cater to libcs that poke about in kernel headers. */ |
| 8 | |
| 9 | #define NSIG 32 |
| 10 | typedef unsigned long sigset_t; |
| 11 | |
David Howells | 5c55b40 | 2009-06-13 13:23:54 +0100 | [diff] [blame] | 12 | #endif /* !__KERNEL__ */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | |
David Howells | 5c55b40 | 2009-06-13 13:23:54 +0100 | [diff] [blame] | 14 | #define SA_RESTORER 0x04000000 /* to get struct sigaction correct */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | |
Al Viro | b1ecb4c | 2005-05-04 05:40:12 +0100 | [diff] [blame] | 16 | #include <asm-generic/signal.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | |
| 18 | #ifdef __KERNEL__ |
| 19 | struct old_sigaction { |
| 20 | __sighandler_t sa_handler; |
| 21 | old_sigset_t sa_mask; |
| 22 | unsigned long sa_flags; |
Al Viro | 9e4d11f | 2006-06-23 02:04:04 -0700 | [diff] [blame] | 23 | __sigrestore_t sa_restorer; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | }; |
| 25 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | #else |
| 27 | /* Here we must cater to libcs that poke about in kernel headers. */ |
| 28 | |
| 29 | struct sigaction { |
| 30 | union { |
| 31 | __sighandler_t _sa_handler; |
| 32 | void (*_sa_sigaction)(int, struct siginfo *, void *); |
| 33 | } _u; |
| 34 | sigset_t sa_mask; |
| 35 | unsigned long sa_flags; |
| 36 | void (*sa_restorer)(void); |
| 37 | }; |
| 38 | |
| 39 | #define sa_handler _u._sa_handler |
| 40 | #define sa_sigaction _u._sa_sigaction |
| 41 | |
| 42 | #endif /* __KERNEL__ */ |
| 43 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | #endif /* _ASM_SIGNAL_H */ |