vserver 1.9.3
[linux-2.6.git] / include / asm-sparc64 / siginfo.h
1 #ifndef _SPARC64_SIGINFO_H
2 #define _SPARC64_SIGINFO_H
3
4 #define SI_PAD_SIZE32   ((SI_MAX_SIZE/sizeof(int)) - 3)
5
6 #define SIGEV_PAD_SIZE  ((SIGEV_MAX_SIZE/sizeof(int)) - 4)
7 #define SIGEV_PAD_SIZE32 ((SIGEV_MAX_SIZE/sizeof(int)) - 3)
8
9 #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
10 #define __ARCH_SI_TRAPNO
11 #define __ARCH_SI_BAND_T int
12
13 #include <asm-generic/siginfo.h>
14
15 #ifdef __KERNEL__
16
17 #include <linux/config.h>
18 #include <linux/compat.h>
19
20 #ifdef CONFIG_COMPAT
21
22 typedef union sigval32 {
23         int sival_int;
24         u32 sival_ptr;
25 } sigval_t32;
26
27 struct siginfo32;
28
29 #endif /* CONFIG_COMPAT */
30
31 #endif /* __KERNEL__ */
32
33 #define SI_NOINFO       32767           /* no information in siginfo_t */
34
35 /*
36  * SIGEMT si_codes
37  */
38 #define EMT_TAGOVF      (__SI_FAULT|1)  /* tag overflow */
39 #define NSIGEMT         1
40
41 #ifdef __KERNEL__
42
43 #ifdef CONFIG_COMPAT
44
45 typedef struct sigevent32 {
46         sigval_t32 sigev_value;
47         int sigev_signo;
48         int sigev_notify;
49         union {
50                 int _pad[SIGEV_PAD_SIZE32];
51
52                 struct {
53                         u32 _function;
54                         u32 _attribute; /* really pthread_attr_t */
55                 } _sigev_thread;
56         } _sigev_un;
57 } sigevent_t32;
58
59 extern int copy_siginfo_to_user32(struct siginfo32 __user *to, siginfo_t *from);
60 extern int copy_siginfo_to_kernel32(siginfo_t *to, struct siginfo32 __user *from);
61
62 #endif /* CONFIG_COMPAT */
63
64 #endif /* __KERNEL__ */
65
66 #endif