1 #ifndef _ASM_X86_64_IA32_H
2 #define _ASM_X86_64_IA32_H
4 #include <linux/config.h>
6 #ifdef CONFIG_IA32_EMULATION
9 * 32 bit structures for IA32 support.
12 /* 32bit compatibility types */
13 typedef unsigned int __kernel_size_t32;
14 typedef int __kernel_ssize_t32;
15 typedef int __kernel_ptrdiff_t32;
16 typedef int __kernel_time_t32;
17 typedef int __kernel_clock_t32;
18 typedef int __kernel_pid_t32;
19 typedef unsigned short __kernel_ipc_pid_t32;
20 typedef unsigned short __kernel_uid_t32;
21 typedef unsigned __kernel_uid32_t32;
22 typedef unsigned short __kernel_gid_t32;
23 typedef unsigned __kernel_gid32_t32;
24 typedef unsigned short __kernel_dev_t32;
25 typedef unsigned int __kernel_ino_t32;
26 typedef unsigned short __kernel_mode_t32;
27 typedef unsigned short __kernel_umode_t32;
28 typedef short __kernel_nlink_t32;
29 typedef int __kernel_daddr_t32;
30 typedef int __kernel_off_t32;
31 typedef unsigned int __kernel_caddr_t32;
32 typedef long __kernel_loff_t32;
33 typedef __kernel_fsid_t __kernel_fsid_t32;
40 __kernel_off_t32 l_start;
41 __kernel_off_t32 l_len;
42 __kernel_pid_t32 l_pid;
49 loff_t l_start; /* unnatural alignment */
52 } __attribute__((packed));
54 #define F_GETLK64 12 /* using 'struct flock64' */
58 #include <asm/sigcontext32.h>
62 #define _IA32_NSIG_BPW 32
63 #define _IA32_NSIG_WORDS (_IA32_NSIG / _IA32_NSIG_BPW)
66 unsigned int sig[_IA32_NSIG_WORDS];
70 unsigned int sa_handler; /* Really a pointer, but need to deal
72 unsigned int sa_flags;
73 unsigned int sa_restorer; /* Another 32 bit pointer */
74 sigset32_t sa_mask; /* A 32 bit mask */
77 typedef unsigned int old_sigset32_t; /* at least 32 bits */
79 struct old_sigaction32 {
80 unsigned int sa_handler; /* Really a pointer, but need to deal
82 old_sigset32_t sa_mask; /* A 32 bit mask */
83 unsigned int sa_flags;
84 unsigned int sa_restorer; /* Another 32 bit pointer */
87 typedef struct sigaltstack_ia32 {
93 struct ucontext_ia32 {
94 unsigned int uc_flags;
96 stack_ia32_t uc_stack;
97 struct sigcontext_ia32 uc_mcontext;
98 sigset32_t uc_sigmask; /* mask last for extensibility */
102 unsigned short st_dev;
103 unsigned short __pad1;
105 unsigned short st_mode;
106 unsigned short st_nlink;
107 unsigned short st_uid;
108 unsigned short st_gid;
109 unsigned short st_rdev;
110 unsigned short __pad2;
111 unsigned int st_size;
112 unsigned int st_blksize;
113 unsigned int st_blocks;
114 unsigned int st_atime;
115 unsigned int __unused1;
116 unsigned int st_mtime;
117 unsigned int __unused2;
118 unsigned int st_ctime;
119 unsigned int __unused3;
120 unsigned int __unused4;
121 unsigned int __unused5;
125 /* This matches struct stat64 in glibc2.2, hence the absolutely
126 * insane amounts of padding around dev_t's.
129 unsigned long long st_dev;
130 unsigned char __pad0[4];
132 #define STAT64_HAS_BROKEN_ST_INO 1
133 unsigned int __st_ino;
135 unsigned int st_mode;
136 unsigned int st_nlink;
141 unsigned long long st_rdev;
142 unsigned char __pad3[4];
145 unsigned int st_blksize;
147 long long st_blocks;/* Number 512-byte blocks allocated. */
149 unsigned long long st_atime;
150 unsigned long long st_mtime;
151 unsigned long long st_ctime;
153 unsigned long long st_ino;
154 } __attribute__((packed));
165 __kernel_fsid_t32 f_fsid;
166 int f_namelen; /* SunOS ignores this field. */
170 typedef union sigval32 {
172 unsigned int sival_ptr;
175 typedef struct siginfo32 {
181 int _pad[((128/sizeof(int)) - 3)];
185 unsigned int _pid; /* sender's pid */
186 unsigned int _uid; /* sender's uid */
189 /* POSIX.1b timers */
191 unsigned int _timer1;
192 unsigned int _timer2;
195 /* POSIX.1b signals */
197 unsigned int _pid; /* sender's pid */
198 unsigned int _uid; /* sender's uid */
204 unsigned int _pid; /* which child */
205 unsigned int _uid; /* sender's uid */
206 int _status; /* exit code */
207 __kernel_clock_t32 _utime;
208 __kernel_clock_t32 _stime;
211 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
213 unsigned int _addr; /* faulting insn/memory ref. */
218 int _band; /* POLL_IN, POLL_OUT, POLL_MSG */
227 __kernel_ino_t32 f_tinode;
233 unsigned int iov_base;
242 #endif /* !CONFIG_IA32_SUPPORT */