4 * Architecture specific compatibility types
6 #include <linux/types.h>
9 #define COMPAT_USER_HZ 100
11 typedef u32 compat_size_t
;
12 typedef s32 compat_ssize_t
;
13 typedef s32 compat_time_t
;
14 typedef s32 compat_clock_t
;
15 typedef s32 compat_suseconds_t
;
17 typedef s32 compat_pid_t
;
18 typedef s32 compat_uid_t
;
19 typedef s32 compat_gid_t
;
20 typedef u32 compat_mode_t
;
21 typedef u32 compat_ino_t
;
22 typedef u32 compat_dev_t
;
23 typedef s32 compat_off_t
;
24 typedef s64 compat_loff_t
;
25 typedef u32 compat_nlink_t
;
26 typedef s32 compat_ipc_pid_t
;
27 typedef s32 compat_daddr_t
;
28 typedef s32 compat_caddr_t
;
33 typedef s32 compat_int_t
;
34 typedef s32 compat_long_t
;
35 typedef u32 compat_uint_t
;
36 typedef u32 compat_ulong_t
;
38 struct compat_timespec
{
43 struct compat_timeval
{
52 compat_mode_t st_mode
;
53 compat_nlink_t st_nlink
;
60 compat_time_t st_atime
;
62 compat_time_t st_mtime
;
64 compat_time_t st_ctime
;
86 struct compat_flock64
{
89 compat_loff_t l_start
;
94 struct compat_statfs
{
103 compat_fsid_t f_fsid
;
108 #define COMPAT_RLIM_INFINITY 0x7fffffffUL
110 typedef u32 compat_old_sigset_t
; /* at least 32 bits */
112 #define _COMPAT_NSIG 128 /* Don't ask !$@#% ... */
113 #define _COMPAT_NSIG_BPW 32
115 typedef u32 compat_sigset_word
;
117 #define COMPAT_OFF_T_MAX 0x7fffffff
118 #define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL
121 * A pointer passed in from user mode. This should not
122 * be used for syscall parameters, just declare them
123 * as pointers because the syscall entry code will have
124 * appropriately comverted them already.
126 typedef u32 compat_uptr_t
;
128 static inline void *compat_ptr(compat_uptr_t uptr
)
130 return (void *)(long)uptr
;
133 static inline void *compat_alloc_user_space(long len
)
135 struct pt_regs
*regs
= (struct pt_regs
*)
136 ((unsigned long) current_thread_info() + THREAD_SIZE
- 32) - 1;
138 return (void *) (regs
->regs
[29] - len
);
140 #if defined (__MIPSEL__)
141 #define __COMPAT_ENDIAN_SWAP__ 1
144 #endif /* _ASM_COMPAT_H */
This page took 0.032766 seconds and 5 git commands to generate.