aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2009-03-16 18:47:11 -0400
committerGreg Ungerer <gerg@uclinux.org>2009-03-16 18:47:11 -0400
commit7a2cf4af1554d891b440cc3a649d01ed222206c3 (patch)
treea6472e779055a87ab8af0b370cab4c571357ae0f /arch
parent9df3d51b59bd6aa48aee76e0cde4b89d854f3694 (diff)
m68k: merge the non-MMU and MMU versions of siginfo.h
It is trivial to merge the non-MMU and MMU versions of siginfo.h. Without a single file "make headers_install" is broken for m68k (since each of the sub-varients of siginfo.h are not installed). Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/m68k/include/asm/siginfo.h98
-rw-r--r--arch/m68k/include/asm/siginfo_mm.h92
-rw-r--r--arch/m68k/include/asm/siginfo_no.h6
3 files changed, 95 insertions, 101 deletions
diff --git a/arch/m68k/include/asm/siginfo.h b/arch/m68k/include/asm/siginfo.h
index 61219d7affc8..ca7dde8fd223 100644
--- a/arch/m68k/include/asm/siginfo.h
+++ b/arch/m68k/include/asm/siginfo.h
@@ -1,5 +1,97 @@
1#ifdef __uClinux__ 1#ifndef _M68K_SIGINFO_H
2#include "siginfo_no.h" 2#define _M68K_SIGINFO_H
3
4#ifndef __uClinux__
5#define HAVE_ARCH_SIGINFO_T
6#define HAVE_ARCH_COPY_SIGINFO
7#endif
8
9#include <asm-generic/siginfo.h>
10
11#ifndef __uClinux__
12
13typedef struct siginfo {
14 int si_signo;
15 int si_errno;
16 int si_code;
17
18 union {
19 int _pad[SI_PAD_SIZE];
20
21 /* kill() */
22 struct {
23 __kernel_pid_t _pid; /* sender's pid */
24 __kernel_uid_t _uid; /* backwards compatibility */
25 __kernel_uid32_t _uid32; /* sender's uid */
26 } _kill;
27
28 /* POSIX.1b timers */
29 struct {
30 timer_t _tid; /* timer id */
31 int _overrun; /* overrun count */
32 char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
33 sigval_t _sigval; /* same as below */
34 int _sys_private; /* not to be passed to user */
35 } _timer;
36
37 /* POSIX.1b signals */
38 struct {
39 __kernel_pid_t _pid; /* sender's pid */
40 __kernel_uid_t _uid; /* backwards compatibility */
41 sigval_t _sigval;
42 __kernel_uid32_t _uid32; /* sender's uid */
43 } _rt;
44
45 /* SIGCHLD */
46 struct {
47 __kernel_pid_t _pid; /* which child */
48 __kernel_uid_t _uid; /* backwards compatibility */
49 int _status; /* exit code */
50 clock_t _utime;
51 clock_t _stime;
52 __kernel_uid32_t _uid32; /* sender's uid */
53 } _sigchld;
54
55 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
56 struct {
57 void *_addr; /* faulting insn/memory ref. */
58 } _sigfault;
59
60 /* SIGPOLL */
61 struct {
62 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
63 int _fd;
64 } _sigpoll;
65 } _sifields;
66} siginfo_t;
67
68#define UID16_SIGINFO_COMPAT_NEEDED
69
70/*
71 * How these fields are to be accessed.
72 */
73#undef si_uid
74#ifdef __KERNEL__
75#define si_uid _sifields._kill._uid32
76#define si_uid16 _sifields._kill._uid
3#else 77#else
4#include "siginfo_mm.h" 78#define si_uid _sifields._kill._uid
79#endif
80
81#ifdef __KERNEL__
82
83#include <linux/string.h>
84
85static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
86{
87 if (from->si_code < 0)
88 memcpy(to, from, sizeof(*to));
89 else
90 /* _sigchld is currently the largest know union member */
91 memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld));
92}
93
94#endif /* __KERNEL__ */
95#endif /* !__uClinux__ */
96
5#endif 97#endif
diff --git a/arch/m68k/include/asm/siginfo_mm.h b/arch/m68k/include/asm/siginfo_mm.h
deleted file mode 100644
index 05a8d6d90b58..000000000000
--- a/arch/m68k/include/asm/siginfo_mm.h
+++ /dev/null
@@ -1,92 +0,0 @@
1#ifndef _M68K_SIGINFO_H
2#define _M68K_SIGINFO_H
3
4#define HAVE_ARCH_SIGINFO_T
5#define HAVE_ARCH_COPY_SIGINFO
6
7#include <asm-generic/siginfo.h>
8
9typedef struct siginfo {
10 int si_signo;
11 int si_errno;
12 int si_code;
13
14 union {
15 int _pad[SI_PAD_SIZE];
16
17 /* kill() */
18 struct {
19 __kernel_pid_t _pid; /* sender's pid */
20 __kernel_uid_t _uid; /* backwards compatibility */
21 __kernel_uid32_t _uid32; /* sender's uid */
22 } _kill;
23
24 /* POSIX.1b timers */
25 struct {
26 timer_t _tid; /* timer id */
27 int _overrun; /* overrun count */
28 char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
29 sigval_t _sigval; /* same as below */
30 int _sys_private; /* not to be passed to user */
31 } _timer;
32
33 /* POSIX.1b signals */
34 struct {
35 __kernel_pid_t _pid; /* sender's pid */
36 __kernel_uid_t _uid; /* backwards compatibility */
37 sigval_t _sigval;
38 __kernel_uid32_t _uid32; /* sender's uid */
39 } _rt;
40
41 /* SIGCHLD */
42 struct {
43 __kernel_pid_t _pid; /* which child */
44 __kernel_uid_t _uid; /* backwards compatibility */
45 int _status; /* exit code */
46 clock_t _utime;
47 clock_t _stime;
48 __kernel_uid32_t _uid32; /* sender's uid */
49 } _sigchld;
50
51 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
52 struct {
53 void *_addr; /* faulting insn/memory ref. */
54 } _sigfault;
55
56 /* SIGPOLL */
57 struct {
58 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
59 int _fd;
60 } _sigpoll;
61 } _sifields;
62} siginfo_t;
63
64#define UID16_SIGINFO_COMPAT_NEEDED
65
66/*
67 * How these fields are to be accessed.
68 */
69#undef si_uid
70#ifdef __KERNEL__
71#define si_uid _sifields._kill._uid32
72#define si_uid16 _sifields._kill._uid
73#else
74#define si_uid _sifields._kill._uid
75#endif
76
77#ifdef __KERNEL__
78
79#include <linux/string.h>
80
81static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
82{
83 if (from->si_code < 0)
84 memcpy(to, from, sizeof(*to));
85 else
86 /* _sigchld is currently the largest know union member */
87 memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld));
88}
89
90#endif /* __KERNEL__ */
91
92#endif
diff --git a/arch/m68k/include/asm/siginfo_no.h b/arch/m68k/include/asm/siginfo_no.h
deleted file mode 100644
index b18e5f4064ae..000000000000
--- a/arch/m68k/include/asm/siginfo_no.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _M68KNOMMU_SIGINFO_H
2#define _M68KNOMMU_SIGINFO_H
3
4#include <asm-generic/siginfo.h>
5
6#endif