Commit 0d77e5a2 authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Linus Torvalds

[PATCH] compat: introduce compat_time_t

This patch is based on work by Carlos O'Donell and Matthew Wilcox.  It
introduces/updates the compat_time_t type and uses it for compat siginfo
structures.  I have built this on ppc64 and x86_64.
Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent fa912bcb
...@@ -241,7 +241,7 @@ typedef struct compat_siginfo { ...@@ -241,7 +241,7 @@ typedef struct compat_siginfo {
/* POSIX.1b timers */ /* POSIX.1b timers */
struct { struct {
timer_t _tid; /* timer id */ compat_timer_t _tid; /* timer id */
int _overrun; /* overrun count */ int _overrun; /* overrun count */
char _pad[sizeof(unsigned int) - sizeof(int)]; char _pad[sizeof(unsigned int) - sizeof(int)];
compat_sigval_t _sigval; /* same as below */ compat_sigval_t _sigval; /* same as below */
......
...@@ -45,7 +45,7 @@ typedef struct compat_siginfo { ...@@ -45,7 +45,7 @@ typedef struct compat_siginfo {
/* POSIX.1b timers */ /* POSIX.1b timers */
struct { struct {
timer_t _tid; /* timer id */ compat_timer_t _tid; /* timer id */
int _overrun; /* overrun count */ int _overrun; /* overrun count */
compat_sigval_t _sigval; /* same as below */ compat_sigval_t _sigval; /* same as below */
int _sys_private; /* not to be passed to user */ int _sys_private; /* not to be passed to user */
......
...@@ -102,7 +102,7 @@ typedef struct compat_siginfo{ ...@@ -102,7 +102,7 @@ typedef struct compat_siginfo{
/* POSIX.1b timers */ /* POSIX.1b timers */
struct { struct {
timer_t _tid; /* timer id */ compat_timer_t _tid; /* timer id */
int _overrun; /* overrun count */ int _overrun; /* overrun count */
compat_sigval_t _sigval; /* same as below */ compat_sigval_t _sigval; /* same as below */
int _sys_private; /* not to be passed to user */ int _sys_private; /* not to be passed to user */
......
...@@ -27,6 +27,7 @@ typedef u16 compat_ipc_pid_t; ...@@ -27,6 +27,7 @@ typedef u16 compat_ipc_pid_t;
typedef s32 compat_daddr_t; typedef s32 compat_daddr_t;
typedef u32 compat_caddr_t; typedef u32 compat_caddr_t;
typedef __kernel_fsid_t compat_fsid_t; typedef __kernel_fsid_t compat_fsid_t;
typedef s32 compat_timer_t;
typedef s32 compat_int_t; typedef s32 compat_int_t;
typedef s32 compat_long_t; typedef s32 compat_long_t;
......
...@@ -29,6 +29,7 @@ typedef s32 compat_caddr_t; ...@@ -29,6 +29,7 @@ typedef s32 compat_caddr_t;
typedef struct { typedef struct {
s32 val[2]; s32 val[2];
} compat_fsid_t; } compat_fsid_t;
typedef s32 compat_timer_t;
typedef s32 compat_int_t; typedef s32 compat_int_t;
typedef s32 compat_long_t; typedef s32 compat_long_t;
......
...@@ -24,7 +24,7 @@ typedef u16 compat_nlink_t; ...@@ -24,7 +24,7 @@ typedef u16 compat_nlink_t;
typedef u16 compat_ipc_pid_t; typedef u16 compat_ipc_pid_t;
typedef s32 compat_daddr_t; typedef s32 compat_daddr_t;
typedef u32 compat_caddr_t; typedef u32 compat_caddr_t;
typedef u32 compat_timer_t; typedef s32 compat_timer_t;
typedef s32 compat_int_t; typedef s32 compat_int_t;
typedef s32 compat_long_t; typedef s32 compat_long_t;
......
...@@ -26,6 +26,7 @@ typedef s32 compat_daddr_t; ...@@ -26,6 +26,7 @@ typedef s32 compat_daddr_t;
typedef u32 compat_caddr_t; typedef u32 compat_caddr_t;
typedef __kernel_fsid_t compat_fsid_t; typedef __kernel_fsid_t compat_fsid_t;
typedef s32 compat_key_t; typedef s32 compat_key_t;
typedef s32 compat_timer_t;
typedef s32 compat_int_t; typedef s32 compat_int_t;
typedef s32 compat_long_t; typedef s32 compat_long_t;
......
...@@ -32,7 +32,7 @@ typedef struct compat_siginfo { ...@@ -32,7 +32,7 @@ typedef struct compat_siginfo {
/* POSIX.1b timers */ /* POSIX.1b timers */
struct { struct {
timer_t _tid; /* timer id */ compat_timer_t _tid; /* timer id */
int _overrun; /* overrun count */ int _overrun; /* overrun count */
compat_sigval_t _sigval; /* same as below */ compat_sigval_t _sigval; /* same as below */
int _sys_private; /* not to be passed to user */ int _sys_private; /* not to be passed to user */
......
...@@ -25,6 +25,7 @@ typedef s32 compat_daddr_t; ...@@ -25,6 +25,7 @@ typedef s32 compat_daddr_t;
typedef u32 compat_caddr_t; typedef u32 compat_caddr_t;
typedef __kernel_fsid_t compat_fsid_t; typedef __kernel_fsid_t compat_fsid_t;
typedef s32 compat_key_t; typedef s32 compat_key_t;
typedef s32 compat_timer_t;
typedef s32 compat_int_t; typedef s32 compat_int_t;
typedef s32 compat_long_t; typedef s32 compat_long_t;
......
...@@ -94,7 +94,7 @@ typedef struct compat_siginfo{ ...@@ -94,7 +94,7 @@ typedef struct compat_siginfo{
/* POSIX.1b timers */ /* POSIX.1b timers */
struct { struct {
int _tid; /* timer id */ compat_timer_t _tid; /* timer id */
int _overrun; /* overrun count */ int _overrun; /* overrun count */
compat_sigval_t _sigval; /* same as below */ compat_sigval_t _sigval; /* same as below */
int _sys_private; /* not to be passed to user */ int _sys_private; /* not to be passed to user */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment