root / syscall-i386.h @ b56dad1c
History | View | Annotate | Download (35.1 kB)
1 | 31e31b8a | bellard | /* from linux/unistd.h */
|
---|---|---|---|
2 | 31e31b8a | bellard | |
3 | 31e31b8a | bellard | #define TARGET_NR_exit 1 |
4 | 31e31b8a | bellard | #define TARGET_NR_fork 2 |
5 | 31e31b8a | bellard | #define TARGET_NR_read 3 |
6 | 31e31b8a | bellard | #define TARGET_NR_write 4 |
7 | 31e31b8a | bellard | #define TARGET_NR_open 5 |
8 | 31e31b8a | bellard | #define TARGET_NR_close 6 |
9 | 31e31b8a | bellard | #define TARGET_NR_waitpid 7 |
10 | 31e31b8a | bellard | #define TARGET_NR_creat 8 |
11 | 31e31b8a | bellard | #define TARGET_NR_link 9 |
12 | 31e31b8a | bellard | #define TARGET_NR_unlink 10 |
13 | 31e31b8a | bellard | #define TARGET_NR_execve 11 |
14 | 31e31b8a | bellard | #define TARGET_NR_chdir 12 |
15 | 31e31b8a | bellard | #define TARGET_NR_time 13 |
16 | 31e31b8a | bellard | #define TARGET_NR_mknod 14 |
17 | 31e31b8a | bellard | #define TARGET_NR_chmod 15 |
18 | 31e31b8a | bellard | #define TARGET_NR_lchown 16 |
19 | 31e31b8a | bellard | #define TARGET_NR_break 17 |
20 | 31e31b8a | bellard | #define TARGET_NR_oldstat 18 |
21 | 31e31b8a | bellard | #define TARGET_NR_lseek 19 |
22 | 31e31b8a | bellard | #define TARGET_NR_getpid 20 |
23 | 31e31b8a | bellard | #define TARGET_NR_mount 21 |
24 | 31e31b8a | bellard | #define TARGET_NR_umount 22 |
25 | 31e31b8a | bellard | #define TARGET_NR_setuid 23 |
26 | 31e31b8a | bellard | #define TARGET_NR_getuid 24 |
27 | 31e31b8a | bellard | #define TARGET_NR_stime 25 |
28 | 31e31b8a | bellard | #define TARGET_NR_ptrace 26 |
29 | 31e31b8a | bellard | #define TARGET_NR_alarm 27 |
30 | 31e31b8a | bellard | #define TARGET_NR_oldfstat 28 |
31 | 31e31b8a | bellard | #define TARGET_NR_pause 29 |
32 | 31e31b8a | bellard | #define TARGET_NR_utime 30 |
33 | 31e31b8a | bellard | #define TARGET_NR_stty 31 |
34 | 31e31b8a | bellard | #define TARGET_NR_gtty 32 |
35 | 31e31b8a | bellard | #define TARGET_NR_access 33 |
36 | 31e31b8a | bellard | #define TARGET_NR_nice 34 |
37 | 31e31b8a | bellard | #define TARGET_NR_ftime 35 |
38 | 31e31b8a | bellard | #define TARGET_NR_sync 36 |
39 | 31e31b8a | bellard | #define TARGET_NR_kill 37 |
40 | 31e31b8a | bellard | #define TARGET_NR_rename 38 |
41 | 31e31b8a | bellard | #define TARGET_NR_mkdir 39 |
42 | 31e31b8a | bellard | #define TARGET_NR_rmdir 40 |
43 | 31e31b8a | bellard | #define TARGET_NR_dup 41 |
44 | 31e31b8a | bellard | #define TARGET_NR_pipe 42 |
45 | 31e31b8a | bellard | #define TARGET_NR_times 43 |
46 | 31e31b8a | bellard | #define TARGET_NR_prof 44 |
47 | 31e31b8a | bellard | #define TARGET_NR_brk 45 |
48 | 31e31b8a | bellard | #define TARGET_NR_setgid 46 |
49 | 31e31b8a | bellard | #define TARGET_NR_getgid 47 |
50 | 31e31b8a | bellard | #define TARGET_NR_signal 48 |
51 | 31e31b8a | bellard | #define TARGET_NR_geteuid 49 |
52 | 31e31b8a | bellard | #define TARGET_NR_getegid 50 |
53 | 31e31b8a | bellard | #define TARGET_NR_acct 51 |
54 | 31e31b8a | bellard | #define TARGET_NR_umount2 52 |
55 | 31e31b8a | bellard | #define TARGET_NR_lock 53 |
56 | 31e31b8a | bellard | #define TARGET_NR_ioctl 54 |
57 | 31e31b8a | bellard | #define TARGET_NR_fcntl 55 |
58 | 31e31b8a | bellard | #define TARGET_NR_mpx 56 |
59 | 31e31b8a | bellard | #define TARGET_NR_setpgid 57 |
60 | 31e31b8a | bellard | #define TARGET_NR_ulimit 58 |
61 | 31e31b8a | bellard | #define TARGET_NR_oldolduname 59 |
62 | 31e31b8a | bellard | #define TARGET_NR_umask 60 |
63 | 31e31b8a | bellard | #define TARGET_NR_chroot 61 |
64 | 31e31b8a | bellard | #define TARGET_NR_ustat 62 |
65 | 31e31b8a | bellard | #define TARGET_NR_dup2 63 |
66 | 31e31b8a | bellard | #define TARGET_NR_getppid 64 |
67 | 31e31b8a | bellard | #define TARGET_NR_getpgrp 65 |
68 | 31e31b8a | bellard | #define TARGET_NR_setsid 66 |
69 | 31e31b8a | bellard | #define TARGET_NR_sigaction 67 |
70 | 31e31b8a | bellard | #define TARGET_NR_sgetmask 68 |
71 | 31e31b8a | bellard | #define TARGET_NR_ssetmask 69 |
72 | 31e31b8a | bellard | #define TARGET_NR_setreuid 70 |
73 | 31e31b8a | bellard | #define TARGET_NR_setregid 71 |
74 | 31e31b8a | bellard | #define TARGET_NR_sigsuspend 72 |
75 | 31e31b8a | bellard | #define TARGET_NR_sigpending 73 |
76 | 31e31b8a | bellard | #define TARGET_NR_sethostname 74 |
77 | 31e31b8a | bellard | #define TARGET_NR_setrlimit 75 |
78 | 31e31b8a | bellard | #define TARGET_NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */ |
79 | 31e31b8a | bellard | #define TARGET_NR_getrusage 77 |
80 | 31e31b8a | bellard | #define TARGET_NR_gettimeofday 78 |
81 | 31e31b8a | bellard | #define TARGET_NR_settimeofday 79 |
82 | 31e31b8a | bellard | #define TARGET_NR_getgroups 80 |
83 | 31e31b8a | bellard | #define TARGET_NR_setgroups 81 |
84 | 31e31b8a | bellard | #define TARGET_NR_select 82 |
85 | 31e31b8a | bellard | #define TARGET_NR_symlink 83 |
86 | 31e31b8a | bellard | #define TARGET_NR_oldlstat 84 |
87 | 31e31b8a | bellard | #define TARGET_NR_readlink 85 |
88 | 31e31b8a | bellard | #define TARGET_NR_uselib 86 |
89 | 31e31b8a | bellard | #define TARGET_NR_swapon 87 |
90 | 31e31b8a | bellard | #define TARGET_NR_reboot 88 |
91 | 31e31b8a | bellard | #define TARGET_NR_readdir 89 |
92 | 31e31b8a | bellard | #define TARGET_NR_mmap 90 |
93 | 31e31b8a | bellard | #define TARGET_NR_munmap 91 |
94 | 31e31b8a | bellard | #define TARGET_NR_truncate 92 |
95 | 31e31b8a | bellard | #define TARGET_NR_ftruncate 93 |
96 | 31e31b8a | bellard | #define TARGET_NR_fchmod 94 |
97 | 31e31b8a | bellard | #define TARGET_NR_fchown 95 |
98 | 31e31b8a | bellard | #define TARGET_NR_getpriority 96 |
99 | 31e31b8a | bellard | #define TARGET_NR_setpriority 97 |
100 | 31e31b8a | bellard | #define TARGET_NR_profil 98 |
101 | 31e31b8a | bellard | #define TARGET_NR_statfs 99 |
102 | 31e31b8a | bellard | #define TARGET_NR_fstatfs 100 |
103 | 31e31b8a | bellard | #define TARGET_NR_ioperm 101 |
104 | 31e31b8a | bellard | #define TARGET_NR_socketcall 102 |
105 | 31e31b8a | bellard | #define TARGET_NR_syslog 103 |
106 | 31e31b8a | bellard | #define TARGET_NR_setitimer 104 |
107 | 31e31b8a | bellard | #define TARGET_NR_getitimer 105 |
108 | 31e31b8a | bellard | #define TARGET_NR_stat 106 |
109 | 31e31b8a | bellard | #define TARGET_NR_lstat 107 |
110 | 31e31b8a | bellard | #define TARGET_NR_fstat 108 |
111 | 31e31b8a | bellard | #define TARGET_NR_olduname 109 |
112 | 31e31b8a | bellard | #define TARGET_NR_iopl 110 |
113 | 31e31b8a | bellard | #define TARGET_NR_vhangup 111 |
114 | 31e31b8a | bellard | #define TARGET_NR_idle 112 |
115 | 31e31b8a | bellard | #define TARGET_NR_vm86old 113 |
116 | 31e31b8a | bellard | #define TARGET_NR_wait4 114 |
117 | 31e31b8a | bellard | #define TARGET_NR_swapoff 115 |
118 | 31e31b8a | bellard | #define TARGET_NR_sysinfo 116 |
119 | 31e31b8a | bellard | #define TARGET_NR_ipc 117 |
120 | 31e31b8a | bellard | #define TARGET_NR_fsync 118 |
121 | 31e31b8a | bellard | #define TARGET_NR_sigreturn 119 |
122 | 31e31b8a | bellard | #define TARGET_NR_clone 120 |
123 | 31e31b8a | bellard | #define TARGET_NR_setdomainname 121 |
124 | 31e31b8a | bellard | #define TARGET_NR_uname 122 |
125 | 31e31b8a | bellard | #define TARGET_NR_modify_ldt 123 |
126 | 31e31b8a | bellard | #define TARGET_NR_adjtimex 124 |
127 | 31e31b8a | bellard | #define TARGET_NR_mprotect 125 |
128 | 31e31b8a | bellard | #define TARGET_NR_sigprocmask 126 |
129 | 31e31b8a | bellard | #define TARGET_NR_create_module 127 |
130 | 31e31b8a | bellard | #define TARGET_NR_init_module 128 |
131 | 31e31b8a | bellard | #define TARGET_NR_delete_module 129 |
132 | 31e31b8a | bellard | #define TARGET_NR_get_kernel_syms 130 |
133 | 31e31b8a | bellard | #define TARGET_NR_quotactl 131 |
134 | 31e31b8a | bellard | #define TARGET_NR_getpgid 132 |
135 | 31e31b8a | bellard | #define TARGET_NR_fchdir 133 |
136 | 31e31b8a | bellard | #define TARGET_NR_bdflush 134 |
137 | 31e31b8a | bellard | #define TARGET_NR_sysfs 135 |
138 | 31e31b8a | bellard | #define TARGET_NR_personality 136 |
139 | 31e31b8a | bellard | #define TARGET_NR_afs_syscall 137 /* Syscall for Andrew File System */ |
140 | 31e31b8a | bellard | #define TARGET_NR_setfsuid 138 |
141 | 31e31b8a | bellard | #define TARGET_NR_setfsgid 139 |
142 | 31e31b8a | bellard | #define TARGET_NR__llseek 140 |
143 | 31e31b8a | bellard | #define TARGET_NR_getdents 141 |
144 | 31e31b8a | bellard | #define TARGET_NR__newselect 142 |
145 | 31e31b8a | bellard | #define TARGET_NR_flock 143 |
146 | 31e31b8a | bellard | #define TARGET_NR_msync 144 |
147 | 31e31b8a | bellard | #define TARGET_NR_readv 145 |
148 | 31e31b8a | bellard | #define TARGET_NR_writev 146 |
149 | 31e31b8a | bellard | #define TARGET_NR_getsid 147 |
150 | 31e31b8a | bellard | #define TARGET_NR_fdatasync 148 |
151 | 31e31b8a | bellard | #define TARGET_NR__sysctl 149 |
152 | 31e31b8a | bellard | #define TARGET_NR_mlock 150 |
153 | 31e31b8a | bellard | #define TARGET_NR_munlock 151 |
154 | 31e31b8a | bellard | #define TARGET_NR_mlockall 152 |
155 | 31e31b8a | bellard | #define TARGET_NR_munlockall 153 |
156 | 31e31b8a | bellard | #define TARGET_NR_sched_setparam 154 |
157 | 31e31b8a | bellard | #define TARGET_NR_sched_getparam 155 |
158 | 31e31b8a | bellard | #define TARGET_NR_sched_setscheduler 156 |
159 | 31e31b8a | bellard | #define TARGET_NR_sched_getscheduler 157 |
160 | 31e31b8a | bellard | #define TARGET_NR_sched_yield 158 |
161 | 31e31b8a | bellard | #define TARGET_NR_sched_get_priority_max 159 |
162 | 31e31b8a | bellard | #define TARGET_NR_sched_get_priority_min 160 |
163 | 31e31b8a | bellard | #define TARGET_NR_sched_rr_get_interval 161 |
164 | 31e31b8a | bellard | #define TARGET_NR_nanosleep 162 |
165 | 31e31b8a | bellard | #define TARGET_NR_mremap 163 |
166 | 31e31b8a | bellard | #define TARGET_NR_setresuid 164 |
167 | 31e31b8a | bellard | #define TARGET_NR_getresuid 165 |
168 | 31e31b8a | bellard | #define TARGET_NR_vm86 166 |
169 | 31e31b8a | bellard | #define TARGET_NR_query_module 167 |
170 | 31e31b8a | bellard | #define TARGET_NR_poll 168 |
171 | 31e31b8a | bellard | #define TARGET_NR_nfsservctl 169 |
172 | 31e31b8a | bellard | #define TARGET_NR_setresgid 170 |
173 | 31e31b8a | bellard | #define TARGET_NR_getresgid 171 |
174 | 31e31b8a | bellard | #define TARGET_NR_prctl 172 |
175 | 31e31b8a | bellard | #define TARGET_NR_rt_sigreturn 173 |
176 | 31e31b8a | bellard | #define TARGET_NR_rt_sigaction 174 |
177 | 31e31b8a | bellard | #define TARGET_NR_rt_sigprocmask 175 |
178 | 31e31b8a | bellard | #define TARGET_NR_rt_sigpending 176 |
179 | 31e31b8a | bellard | #define TARGET_NR_rt_sigtimedwait 177 |
180 | 31e31b8a | bellard | #define TARGET_NR_rt_sigqueueinfo 178 |
181 | 31e31b8a | bellard | #define TARGET_NR_rt_sigsuspend 179 |
182 | 31e31b8a | bellard | #define TARGET_NR_pread 180 |
183 | 31e31b8a | bellard | #define TARGET_NR_pwrite 181 |
184 | 31e31b8a | bellard | #define TARGET_NR_chown 182 |
185 | 31e31b8a | bellard | #define TARGET_NR_getcwd 183 |
186 | 31e31b8a | bellard | #define TARGET_NR_capget 184 |
187 | 31e31b8a | bellard | #define TARGET_NR_capset 185 |
188 | 31e31b8a | bellard | #define TARGET_NR_sigaltstack 186 |
189 | 31e31b8a | bellard | #define TARGET_NR_sendfile 187 |
190 | 31e31b8a | bellard | #define TARGET_NR_getpmsg 188 /* some people actually want streams */ |
191 | 31e31b8a | bellard | #define TARGET_NR_putpmsg 189 /* some people actually want streams */ |
192 | 31e31b8a | bellard | #define TARGET_NR_vfork 190 |
193 | 31e31b8a | bellard | #define TARGET_NR_ugetrlimit 191 /* SuS compliant getrlimit */ |
194 | 31e31b8a | bellard | #define TARGET_NR_mmap2 192 |
195 | 31e31b8a | bellard | #define TARGET_NR_truncate64 193 |
196 | 31e31b8a | bellard | #define TARGET_NR_ftruncate64 194 |
197 | 31e31b8a | bellard | #define TARGET_NR_stat64 195 |
198 | 31e31b8a | bellard | #define TARGET_NR_lstat64 196 |
199 | 31e31b8a | bellard | #define TARGET_NR_fstat64 197 |
200 | 31e31b8a | bellard | #define TARGET_NR_lchown32 198 |
201 | 31e31b8a | bellard | #define TARGET_NR_getuid32 199 |
202 | 31e31b8a | bellard | #define TARGET_NR_getgid32 200 |
203 | 31e31b8a | bellard | #define TARGET_NR_geteuid32 201 |
204 | 31e31b8a | bellard | #define TARGET_NR_getegid32 202 |
205 | 31e31b8a | bellard | #define TARGET_NR_setreuid32 203 |
206 | 31e31b8a | bellard | #define TARGET_NR_setregid32 204 |
207 | 31e31b8a | bellard | #define TARGET_NR_getgroups32 205 |
208 | 31e31b8a | bellard | #define TARGET_NR_setgroups32 206 |
209 | 31e31b8a | bellard | #define TARGET_NR_fchown32 207 |
210 | 31e31b8a | bellard | #define TARGET_NR_setresuid32 208 |
211 | 31e31b8a | bellard | #define TARGET_NR_getresuid32 209 |
212 | 31e31b8a | bellard | #define TARGET_NR_setresgid32 210 |
213 | 31e31b8a | bellard | #define TARGET_NR_getresgid32 211 |
214 | 31e31b8a | bellard | #define TARGET_NR_chown32 212 |
215 | 31e31b8a | bellard | #define TARGET_NR_setuid32 213 |
216 | 31e31b8a | bellard | #define TARGET_NR_setgid32 214 |
217 | 31e31b8a | bellard | #define TARGET_NR_setfsuid32 215 |
218 | 31e31b8a | bellard | #define TARGET_NR_setfsgid32 216 |
219 | 31e31b8a | bellard | #define TARGET_NR_pivot_root 217 |
220 | 31e31b8a | bellard | #define TARGET_NR_mincore 218 |
221 | 31e31b8a | bellard | #define TARGET_NR_madvise 219 |
222 | 31e31b8a | bellard | #define TARGET_NR_madvise1 219 /* delete when C lib stub is removed */ |
223 | 31e31b8a | bellard | #define TARGET_NR_getdents64 220 |
224 | 31e31b8a | bellard | #define TARGET_NR_fcntl64 221 |
225 | 31e31b8a | bellard | #define TARGET_NR_security 223 /* syscall for security modules */ |
226 | 31e31b8a | bellard | #define TARGET_NR_gettid 224 |
227 | 31e31b8a | bellard | #define TARGET_NR_readahead 225 |
228 | 31e31b8a | bellard | #define TARGET_NR_setxattr 226 |
229 | 31e31b8a | bellard | #define TARGET_NR_lsetxattr 227 |
230 | 31e31b8a | bellard | #define TARGET_NR_fsetxattr 228 |
231 | 31e31b8a | bellard | #define TARGET_NR_getxattr 229 |
232 | 31e31b8a | bellard | #define TARGET_NR_lgetxattr 230 |
233 | 31e31b8a | bellard | #define TARGET_NR_fgetxattr 231 |
234 | 31e31b8a | bellard | #define TARGET_NR_listxattr 232 |
235 | 31e31b8a | bellard | #define TARGET_NR_llistxattr 233 |
236 | 31e31b8a | bellard | #define TARGET_NR_flistxattr 234 |
237 | 31e31b8a | bellard | #define TARGET_NR_removexattr 235 |
238 | 31e31b8a | bellard | #define TARGET_NR_lremovexattr 236 |
239 | 31e31b8a | bellard | #define TARGET_NR_fremovexattr 237 |
240 | 7ed601b7 | bellard | #define TARGET_NR_tkill 238 |
241 | 7ed601b7 | bellard | #define TARGET_NR_sendfile64 239 |
242 | 7ed601b7 | bellard | #define TARGET_NR_futex 240 |
243 | 7ed601b7 | bellard | #define TARGET_NR_sched_setaffinity 241 |
244 | 7ed601b7 | bellard | #define TARGET_NR_sched_getaffinity 242 |
245 | 7ed601b7 | bellard | #define TARGET_NR_set_thread_area 243 |
246 | 7ed601b7 | bellard | #define TARGET_NR_get_thread_area 244 |
247 | 7ed601b7 | bellard | #define TARGET_NR_io_setup 245 |
248 | 7ed601b7 | bellard | #define TARGET_NR_io_destroy 246 |
249 | 7ed601b7 | bellard | #define TARGET_NR_io_getevents 247 |
250 | 7ed601b7 | bellard | #define TARGET_NR_io_submit 248 |
251 | 7ed601b7 | bellard | #define TARGET_NR_io_cancel 249 |
252 | 7ed601b7 | bellard | #define TARGET_NR_fadvise64 250 |
253 | 7ed601b7 | bellard | |
254 | 7ed601b7 | bellard | #define TARGET_NR_exit_group 252 |
255 | 7ed601b7 | bellard | #define TARGET_NR_lookup_dcookie 253 |
256 | 7ed601b7 | bellard | #define TARGET_NR_epoll_create 254 |
257 | 7ed601b7 | bellard | #define TARGET_NR_epoll_ctl 255 |
258 | 7ed601b7 | bellard | #define TARGET_NR_epoll_wait 256 |
259 | 7ed601b7 | bellard | #define TARGET_NR_remap_file_pages 257 |
260 | 7ed601b7 | bellard | #define TARGET_NR_set_tid_address 258 |
261 | 7ed601b7 | bellard | #define TARGET_NR_timer_create 259 |
262 | 7ed601b7 | bellard | #define TARGET_NR_timer_settime (TARGET_NR_timer_create+1) |
263 | 7ed601b7 | bellard | #define TARGET_NR_timer_gettime (TARGET_NR_timer_create+2) |
264 | 7ed601b7 | bellard | #define TARGET_NR_timer_getoverrun (TARGET_NR_timer_create+3) |
265 | 7ed601b7 | bellard | #define TARGET_NR_timer_delete (TARGET_NR_timer_create+4) |
266 | 7ed601b7 | bellard | #define TARGET_NR_clock_settime (TARGET_NR_timer_create+5) |
267 | 7ed601b7 | bellard | #define TARGET_NR_clock_gettime (TARGET_NR_timer_create+6) |
268 | 7ed601b7 | bellard | #define TARGET_NR_clock_getres (TARGET_NR_timer_create+7) |
269 | 7ed601b7 | bellard | #define TARGET_NR_clock_nanosleep (TARGET_NR_timer_create+8) |
270 | 31e31b8a | bellard | |
271 | 31e31b8a | bellard | #define TARGET_SIG_BLOCK 0 /* for blocking signals */ |
272 | 31e31b8a | bellard | #define TARGET_SIG_UNBLOCK 1 /* for unblocking signals */ |
273 | 31e31b8a | bellard | #define TARGET_SIG_SETMASK 2 /* for setting the signal mask */ |
274 | 31e31b8a | bellard | |
275 | 31e31b8a | bellard | struct target_stat {
|
276 | 31e31b8a | bellard | unsigned short st_dev; |
277 | 31e31b8a | bellard | unsigned short __pad1; |
278 | 60cd49d5 | bellard | target_ulong st_ino; |
279 | 31e31b8a | bellard | unsigned short st_mode; |
280 | 31e31b8a | bellard | unsigned short st_nlink; |
281 | 31e31b8a | bellard | unsigned short st_uid; |
282 | 31e31b8a | bellard | unsigned short st_gid; |
283 | 31e31b8a | bellard | unsigned short st_rdev; |
284 | 31e31b8a | bellard | unsigned short __pad2; |
285 | 60cd49d5 | bellard | target_ulong st_size; |
286 | 60cd49d5 | bellard | target_ulong st_blksize; |
287 | 60cd49d5 | bellard | target_ulong st_blocks; |
288 | 7854b056 | bellard | target_ulong target_st_atime; |
289 | 60cd49d5 | bellard | target_ulong __unused1; |
290 | 7854b056 | bellard | target_ulong target_st_mtime; |
291 | 60cd49d5 | bellard | target_ulong __unused2; |
292 | 7854b056 | bellard | target_ulong target_st_ctime; |
293 | 60cd49d5 | bellard | target_ulong __unused3; |
294 | 60cd49d5 | bellard | target_ulong __unused4; |
295 | 60cd49d5 | bellard | target_ulong __unused5; |
296 | 31e31b8a | bellard | }; |
297 | 31e31b8a | bellard | |
298 | 31e31b8a | bellard | /* This matches struct stat64 in glibc2.1, hence the absolutely
|
299 | 31e31b8a | bellard | * insane amounts of padding around dev_t's.
|
300 | 31e31b8a | bellard | */
|
301 | 31e31b8a | bellard | struct target_stat64 {
|
302 | 31e31b8a | bellard | unsigned short st_dev; |
303 | 31e31b8a | bellard | unsigned char __pad0[10]; |
304 | 31e31b8a | bellard | |
305 | 1d346ae6 | bellard | #define TARGET_STAT64_HAS_BROKEN_ST_INO 1 |
306 | 60cd49d5 | bellard | target_ulong __st_ino; |
307 | 31e31b8a | bellard | |
308 | 31e31b8a | bellard | unsigned int st_mode; |
309 | 31e31b8a | bellard | unsigned int st_nlink; |
310 | 31e31b8a | bellard | |
311 | 60cd49d5 | bellard | target_ulong st_uid; |
312 | 60cd49d5 | bellard | target_ulong st_gid; |
313 | 31e31b8a | bellard | |
314 | 31e31b8a | bellard | unsigned short st_rdev; |
315 | 31e31b8a | bellard | unsigned char __pad3[10]; |
316 | 31e31b8a | bellard | |
317 | 31e31b8a | bellard | long long st_size; |
318 | 60cd49d5 | bellard | target_ulong st_blksize; |
319 | 31e31b8a | bellard | |
320 | 60cd49d5 | bellard | target_ulong st_blocks; /* Number 512-byte blocks allocated. */
|
321 | 60cd49d5 | bellard | target_ulong __pad4; /* future possible st_blocks high bits */
|
322 | 31e31b8a | bellard | |
323 | 7854b056 | bellard | target_ulong target_st_atime; |
324 | 60cd49d5 | bellard | target_ulong __pad5; |
325 | 31e31b8a | bellard | |
326 | 7854b056 | bellard | target_ulong target_st_mtime; |
327 | 60cd49d5 | bellard | target_ulong __pad6; |
328 | 31e31b8a | bellard | |
329 | 7854b056 | bellard | target_ulong target_st_ctime; |
330 | 60cd49d5 | bellard | target_ulong __pad7; /* will be high 32 bits of ctime someday */
|
331 | 31e31b8a | bellard | |
332 | 31e31b8a | bellard | unsigned long long st_ino; |
333 | 728584be | bellard | } __attribute__((packed)); |
334 | 31e31b8a | bellard | |
335 | 66fb9763 | bellard | #define TARGET_SA_NOCLDSTOP 0x00000001 |
336 | 66fb9763 | bellard | #define TARGET_SA_NOCLDWAIT 0x00000002 /* not supported yet */ |
337 | 66fb9763 | bellard | #define TARGET_SA_SIGINFO 0x00000004 |
338 | 66fb9763 | bellard | #define TARGET_SA_ONSTACK 0x08000000 |
339 | 66fb9763 | bellard | #define TARGET_SA_RESTART 0x10000000 |
340 | 66fb9763 | bellard | #define TARGET_SA_NODEFER 0x40000000 |
341 | 66fb9763 | bellard | #define TARGET_SA_RESETHAND 0x80000000 |
342 | 66fb9763 | bellard | #define TARGET_SA_RESTORER 0x04000000 |
343 | 66fb9763 | bellard | |
344 | 66fb9763 | bellard | #define TARGET_SIGHUP 1 |
345 | 66fb9763 | bellard | #define TARGET_SIGINT 2 |
346 | 66fb9763 | bellard | #define TARGET_SIGQUIT 3 |
347 | 66fb9763 | bellard | #define TARGET_SIGILL 4 |
348 | 66fb9763 | bellard | #define TARGET_SIGTRAP 5 |
349 | 66fb9763 | bellard | #define TARGET_SIGABRT 6 |
350 | 66fb9763 | bellard | #define TARGET_SIGIOT 6 |
351 | 66fb9763 | bellard | #define TARGET_SIGBUS 7 |
352 | 66fb9763 | bellard | #define TARGET_SIGFPE 8 |
353 | 66fb9763 | bellard | #define TARGET_SIGKILL 9 |
354 | 66fb9763 | bellard | #define TARGET_SIGUSR1 10 |
355 | 66fb9763 | bellard | #define TARGET_SIGSEGV 11 |
356 | 66fb9763 | bellard | #define TARGET_SIGUSR2 12 |
357 | 66fb9763 | bellard | #define TARGET_SIGPIPE 13 |
358 | 66fb9763 | bellard | #define TARGET_SIGALRM 14 |
359 | 66fb9763 | bellard | #define TARGET_SIGTERM 15 |
360 | 66fb9763 | bellard | #define TARGET_SIGSTKFLT 16 |
361 | 66fb9763 | bellard | #define TARGET_SIGCHLD 17 |
362 | 66fb9763 | bellard | #define TARGET_SIGCONT 18 |
363 | 66fb9763 | bellard | #define TARGET_SIGSTOP 19 |
364 | 66fb9763 | bellard | #define TARGET_SIGTSTP 20 |
365 | 66fb9763 | bellard | #define TARGET_SIGTTIN 21 |
366 | 66fb9763 | bellard | #define TARGET_SIGTTOU 22 |
367 | 66fb9763 | bellard | #define TARGET_SIGURG 23 |
368 | 66fb9763 | bellard | #define TARGET_SIGXCPU 24 |
369 | 66fb9763 | bellard | #define TARGET_SIGXFSZ 25 |
370 | 66fb9763 | bellard | #define TARGET_SIGVTALRM 26 |
371 | 66fb9763 | bellard | #define TARGET_SIGPROF 27 |
372 | 66fb9763 | bellard | #define TARGET_SIGWINCH 28 |
373 | 66fb9763 | bellard | #define TARGET_SIGIO 29 |
374 | 66fb9763 | bellard | #define TARGET_SIGRTMIN 32 |
375 | 31e31b8a | bellard | |
376 | 31e31b8a | bellard | struct target_old_sigaction {
|
377 | 31e31b8a | bellard | target_ulong _sa_handler; |
378 | 31e31b8a | bellard | target_ulong sa_mask; |
379 | 31e31b8a | bellard | target_ulong sa_flags; |
380 | 66fb9763 | bellard | target_ulong sa_restorer; |
381 | 31e31b8a | bellard | }; |
382 | 31e31b8a | bellard | |
383 | 31e31b8a | bellard | struct target_sigaction {
|
384 | 31e31b8a | bellard | target_ulong _sa_handler; |
385 | 31e31b8a | bellard | target_ulong sa_flags; |
386 | 31e31b8a | bellard | target_ulong sa_restorer; |
387 | 66fb9763 | bellard | target_sigset_t sa_mask; |
388 | 31e31b8a | bellard | }; |
389 | 31e31b8a | bellard | |
390 | 31e31b8a | bellard | typedef union target_sigval { |
391 | 31e31b8a | bellard | int sival_int;
|
392 | 9de5e440 | bellard | target_ulong sival_ptr; |
393 | 31e31b8a | bellard | } target_sigval_t; |
394 | 31e31b8a | bellard | |
395 | 31e31b8a | bellard | #define TARGET_SI_MAX_SIZE 128 |
396 | 31e31b8a | bellard | #define TARGET_SI_PAD_SIZE ((TARGET_SI_MAX_SIZE/sizeof(int)) - 3) |
397 | 31e31b8a | bellard | |
398 | 31e31b8a | bellard | typedef struct target_siginfo { |
399 | 31e31b8a | bellard | int si_signo;
|
400 | 31e31b8a | bellard | int si_errno;
|
401 | 31e31b8a | bellard | int si_code;
|
402 | 31e31b8a | bellard | |
403 | 31e31b8a | bellard | union {
|
404 | 31e31b8a | bellard | int _pad[TARGET_SI_PAD_SIZE];
|
405 | 31e31b8a | bellard | |
406 | 31e31b8a | bellard | /* kill() */
|
407 | 31e31b8a | bellard | struct {
|
408 | 31e31b8a | bellard | pid_t _pid; /* sender's pid */
|
409 | 31e31b8a | bellard | uid_t _uid; /* sender's uid */
|
410 | 31e31b8a | bellard | } _kill; |
411 | 31e31b8a | bellard | |
412 | 31e31b8a | bellard | /* POSIX.1b timers */
|
413 | 31e31b8a | bellard | struct {
|
414 | 31e31b8a | bellard | unsigned int _timer1; |
415 | 31e31b8a | bellard | unsigned int _timer2; |
416 | 31e31b8a | bellard | } _timer; |
417 | 31e31b8a | bellard | |
418 | 31e31b8a | bellard | /* POSIX.1b signals */
|
419 | 31e31b8a | bellard | struct {
|
420 | 31e31b8a | bellard | pid_t _pid; /* sender's pid */
|
421 | 31e31b8a | bellard | uid_t _uid; /* sender's uid */
|
422 | 9de5e440 | bellard | target_sigval_t _sigval; |
423 | 31e31b8a | bellard | } _rt; |
424 | 31e31b8a | bellard | |
425 | 31e31b8a | bellard | /* SIGCHLD */
|
426 | 31e31b8a | bellard | struct {
|
427 | 31e31b8a | bellard | pid_t _pid; /* which child */
|
428 | 31e31b8a | bellard | uid_t _uid; /* sender's uid */
|
429 | 31e31b8a | bellard | int _status; /* exit code */ |
430 | 8c8f42f7 | bellard | target_clock_t _utime; |
431 | 8c8f42f7 | bellard | target_clock_t _stime; |
432 | 31e31b8a | bellard | } _sigchld; |
433 | 31e31b8a | bellard | |
434 | 31e31b8a | bellard | /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
|
435 | 31e31b8a | bellard | struct {
|
436 | 9de5e440 | bellard | target_ulong _addr; /* faulting insn/memory ref. */
|
437 | 31e31b8a | bellard | } _sigfault; |
438 | 31e31b8a | bellard | |
439 | 31e31b8a | bellard | /* SIGPOLL */
|
440 | 31e31b8a | bellard | struct {
|
441 | 31e31b8a | bellard | int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ |
442 | 31e31b8a | bellard | int _fd;
|
443 | 31e31b8a | bellard | } _sigpoll; |
444 | 31e31b8a | bellard | } _sifields; |
445 | 31e31b8a | bellard | } target_siginfo_t; |
446 | 31e31b8a | bellard | |
447 | 9de5e440 | bellard | /*
|
448 | 9de5e440 | bellard | * SIGILL si_codes
|
449 | 9de5e440 | bellard | */
|
450 | 9de5e440 | bellard | #define TARGET_ILL_ILLOPN (2) /* illegal operand */ |
451 | 9de5e440 | bellard | |
452 | 9de5e440 | bellard | /*
|
453 | 9de5e440 | bellard | * SIGFPE si_codes
|
454 | 9de5e440 | bellard | */
|
455 | 9de5e440 | bellard | #define TARGET_FPE_INTDIV (1) /* integer divide by zero */ |
456 | 9de5e440 | bellard | #define TARGET_FPE_INTOVF (2) /* integer overflow */ |
457 | 9de5e440 | bellard | #define TARGET_FPE_FLTDIV (3) /* floating point divide by zero */ |
458 | 9de5e440 | bellard | #define TARGET_FPE_FLTOVF (4) /* floating point overflow */ |
459 | 9de5e440 | bellard | #define TARGET_FPE_FLTUND (5) /* floating point underflow */ |
460 | 9de5e440 | bellard | #define TARGET_FPE_FLTRES (6) /* floating point inexact result */ |
461 | 9de5e440 | bellard | #define TARGET_FPE_FLTINV (7) /* floating point invalid operation */ |
462 | 9de5e440 | bellard | #define TARGET_FPE_FLTSUB (8) /* subscript out of range */ |
463 | 9de5e440 | bellard | #define TARGET_NSIGFPE 8 |
464 | 9de5e440 | bellard | |
465 | 9de5e440 | bellard | /* default linux values for the selectors */
|
466 | 9de5e440 | bellard | #define __USER_CS (0x23) |
467 | 9de5e440 | bellard | #define __USER_DS (0x2B) |
468 | 9de5e440 | bellard | |
469 | 9de5e440 | bellard | struct target_pt_regs {
|
470 | 9de5e440 | bellard | long ebx;
|
471 | 9de5e440 | bellard | long ecx;
|
472 | 9de5e440 | bellard | long edx;
|
473 | 9de5e440 | bellard | long esi;
|
474 | 9de5e440 | bellard | long edi;
|
475 | 9de5e440 | bellard | long ebp;
|
476 | 9de5e440 | bellard | long eax;
|
477 | 9de5e440 | bellard | int xds;
|
478 | 9de5e440 | bellard | int xes;
|
479 | 9de5e440 | bellard | long orig_eax;
|
480 | 9de5e440 | bellard | long eip;
|
481 | 9de5e440 | bellard | int xcs;
|
482 | 9de5e440 | bellard | long eflags;
|
483 | 9de5e440 | bellard | long esp;
|
484 | 9de5e440 | bellard | int xss;
|
485 | 9de5e440 | bellard | }; |
486 | 9de5e440 | bellard | |
487 | 31e31b8a | bellard | /* ioctls */
|
488 | 31e31b8a | bellard | |
489 | 31e31b8a | bellard | /*
|
490 | 31e31b8a | bellard | * The following is for compatibility across the various Linux
|
491 | 31e31b8a | bellard | * platforms. The i386 ioctl numbering scheme doesn't really enforce
|
492 | 31e31b8a | bellard | * a type field. De facto, however, the top 8 bits of the lower 16
|
493 | 31e31b8a | bellard | * bits are indeed used as a type field, so we might just as well make
|
494 | 31e31b8a | bellard | * this explicit here. Please be sure to use the decoding macros
|
495 | 31e31b8a | bellard | * below from now on.
|
496 | 31e31b8a | bellard | */
|
497 | 31e31b8a | bellard | #define TARGET_IOC_NRBITS 8 |
498 | 31e31b8a | bellard | #define TARGET_IOC_TYPEBITS 8 |
499 | 31e31b8a | bellard | #define TARGET_IOC_SIZEBITS 14 |
500 | 31e31b8a | bellard | #define TARGET_IOC_DIRBITS 2 |
501 | 31e31b8a | bellard | |
502 | 31e31b8a | bellard | #define TARGET_IOC_NRMASK ((1 << TARGET_IOC_NRBITS)-1) |
503 | 31e31b8a | bellard | #define TARGET_IOC_TYPEMASK ((1 << TARGET_IOC_TYPEBITS)-1) |
504 | 31e31b8a | bellard | #define TARGET_IOC_SIZEMASK ((1 << TARGET_IOC_SIZEBITS)-1) |
505 | 31e31b8a | bellard | #define TARGET_IOC_DIRMASK ((1 << TARGET_IOC_DIRBITS)-1) |
506 | 31e31b8a | bellard | |
507 | 31e31b8a | bellard | #define TARGET_IOC_NRSHIFT 0 |
508 | 31e31b8a | bellard | #define TARGET_IOC_TYPESHIFT (TARGET_IOC_NRSHIFT+TARGET_IOC_NRBITS)
|
509 | 31e31b8a | bellard | #define TARGET_IOC_SIZESHIFT (TARGET_IOC_TYPESHIFT+TARGET_IOC_TYPEBITS)
|
510 | 31e31b8a | bellard | #define TARGET_IOC_DIRSHIFT (TARGET_IOC_SIZESHIFT+TARGET_IOC_SIZEBITS)
|
511 | 31e31b8a | bellard | |
512 | 31e31b8a | bellard | /*
|
513 | 31e31b8a | bellard | * Direction bits.
|
514 | 31e31b8a | bellard | */
|
515 | 31e31b8a | bellard | #define TARGET_IOC_NONE 0U |
516 | 31e31b8a | bellard | #define TARGET_IOC_WRITE 1U |
517 | 31e31b8a | bellard | #define TARGET_IOC_READ 2U |
518 | 31e31b8a | bellard | |
519 | 31e31b8a | bellard | #define TARGET_IOC(dir,type,nr,size) \
|
520 | 31e31b8a | bellard | (((dir) << TARGET_IOC_DIRSHIFT) | \ |
521 | 31e31b8a | bellard | ((type) << TARGET_IOC_TYPESHIFT) | \ |
522 | 31e31b8a | bellard | ((nr) << TARGET_IOC_NRSHIFT) | \ |
523 | 31e31b8a | bellard | ((size) << TARGET_IOC_SIZESHIFT)) |
524 | 31e31b8a | bellard | |
525 | 31e31b8a | bellard | /* used to create numbers */
|
526 | 31e31b8a | bellard | #define TARGET_IO(type,nr) TARGET_IOC(TARGET_IOC_NONE,(type),(nr),0) |
527 | 31e31b8a | bellard | #define TARGET_IOR(type,nr,size) TARGET_IOC(TARGET_IOC_READ,(type),(nr),sizeof(size)) |
528 | 31e31b8a | bellard | #define TARGET_IOW(type,nr,size) TARGET_IOC(TARGET_IOC_WRITE,(type),(nr),sizeof(size)) |
529 | 31e31b8a | bellard | #define TARGET_IOWR(type,nr,size) TARGET_IOC(TARGET_IOC_READ|TARGET_IOC_WRITE,(type),(nr),sizeof(size)) |
530 | 31e31b8a | bellard | |
531 | 31e31b8a | bellard | /* 0x54 is just a magic number to make these relatively unique ('T') */
|
532 | 31e31b8a | bellard | |
533 | 31e31b8a | bellard | #define TARGET_TCGETS 0x5401 |
534 | 31e31b8a | bellard | #define TARGET_TCSETS 0x5402 |
535 | 31e31b8a | bellard | #define TARGET_TCSETSW 0x5403 |
536 | 31e31b8a | bellard | #define TARGET_TCSETSF 0x5404 |
537 | 31e31b8a | bellard | #define TARGET_TCGETA 0x5405 |
538 | 31e31b8a | bellard | #define TARGET_TCSETA 0x5406 |
539 | 31e31b8a | bellard | #define TARGET_TCSETAW 0x5407 |
540 | 31e31b8a | bellard | #define TARGET_TCSETAF 0x5408 |
541 | 31e31b8a | bellard | #define TARGET_TCSBRK 0x5409 |
542 | 31e31b8a | bellard | #define TARGET_TCXONC 0x540A |
543 | 31e31b8a | bellard | #define TARGET_TCFLSH 0x540B |
544 | 31e31b8a | bellard | #define TARGET_TIOCEXCL 0x540C |
545 | 31e31b8a | bellard | #define TARGET_TIOCNXCL 0x540D |
546 | 31e31b8a | bellard | #define TARGET_TIOCSCTTY 0x540E |
547 | 31e31b8a | bellard | #define TARGET_TIOCGPGRP 0x540F |
548 | 31e31b8a | bellard | #define TARGET_TIOCSPGRP 0x5410 |
549 | 31e31b8a | bellard | #define TARGET_TIOCOUTQ 0x5411 |
550 | 31e31b8a | bellard | #define TARGET_TIOCSTI 0x5412 |
551 | 31e31b8a | bellard | #define TARGET_TIOCGWINSZ 0x5413 |
552 | 31e31b8a | bellard | #define TARGET_TIOCSWINSZ 0x5414 |
553 | 31e31b8a | bellard | #define TARGET_TIOCMGET 0x5415 |
554 | 31e31b8a | bellard | #define TARGET_TIOCMBIS 0x5416 |
555 | 31e31b8a | bellard | #define TARGET_TIOCMBIC 0x5417 |
556 | 31e31b8a | bellard | #define TARGET_TIOCMSET 0x5418 |
557 | 31e31b8a | bellard | #define TARGET_TIOCGSOFTCAR 0x5419 |
558 | 31e31b8a | bellard | #define TARGET_TIOCSSOFTCAR 0x541A |
559 | 31e31b8a | bellard | #define TARGET_FIONREAD 0x541B |
560 | 31e31b8a | bellard | #define TARGET_TIOCINQ FIONREAD
|
561 | 31e31b8a | bellard | #define TARGET_TIOCLINUX 0x541C |
562 | 31e31b8a | bellard | #define TARGET_TIOCCONS 0x541D |
563 | 31e31b8a | bellard | #define TARGET_TIOCGSERIAL 0x541E |
564 | 31e31b8a | bellard | #define TARGET_TIOCSSERIAL 0x541F |
565 | 31e31b8a | bellard | #define TARGET_TIOCPKT 0x5420 |
566 | 31e31b8a | bellard | #define TARGET_FIONBIO 0x5421 |
567 | 31e31b8a | bellard | #define TARGET_TIOCNOTTY 0x5422 |
568 | 31e31b8a | bellard | #define TARGET_TIOCSETD 0x5423 |
569 | 31e31b8a | bellard | #define TARGET_TIOCGETD 0x5424 |
570 | 31e31b8a | bellard | #define TARGET_TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ |
571 | 31e31b8a | bellard | #define TARGET_TIOCTTYGSTRUCT 0x5426 /* For debugging only */ |
572 | 31e31b8a | bellard | #define TARGET_TIOCSBRK 0x5427 /* BSD compatibility */ |
573 | 31e31b8a | bellard | #define TARGET_TIOCCBRK 0x5428 /* BSD compatibility */ |
574 | 31e31b8a | bellard | #define TARGET_TIOCGSID 0x5429 /* Return the session ID of FD */ |
575 | f29042b5 | bellard | #define TARGET_TIOCGPTN TARGET_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
576 | f29042b5 | bellard | #define TARGET_TIOCSPTLCK TARGET_IOW('T',0x31, int) /* Lock/unlock Pty */ |
577 | 31e31b8a | bellard | |
578 | 31e31b8a | bellard | #define TARGET_FIONCLEX 0x5450 /* these numbers need to be adjusted. */ |
579 | 31e31b8a | bellard | #define TARGET_FIOCLEX 0x5451 |
580 | 31e31b8a | bellard | #define TARGET_FIOASYNC 0x5452 |
581 | 31e31b8a | bellard | #define TARGET_TIOCSERCONFIG 0x5453 |
582 | 31e31b8a | bellard | #define TARGET_TIOCSERGWILD 0x5454 |
583 | 31e31b8a | bellard | #define TARGET_TIOCSERSWILD 0x5455 |
584 | 31e31b8a | bellard | #define TARGET_TIOCGLCKTRMIOS 0x5456 |
585 | 31e31b8a | bellard | #define TARGET_TIOCSLCKTRMIOS 0x5457 |
586 | 31e31b8a | bellard | #define TARGET_TIOCSERGSTRUCT 0x5458 /* For debugging only */ |
587 | 31e31b8a | bellard | #define TARGET_TIOCSERGETLSR 0x5459 /* Get line status register */ |
588 | 31e31b8a | bellard | #define TARGET_TIOCSERGETMULTI 0x545A /* Get multiport config */ |
589 | 31e31b8a | bellard | #define TARGET_TIOCSERSETMULTI 0x545B /* Set multiport config */ |
590 | 31e31b8a | bellard | |
591 | 31e31b8a | bellard | #define TARGET_TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ |
592 | 31e31b8a | bellard | #define TARGET_TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ |
593 | 31e31b8a | bellard | #define TARGET_TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */ |
594 | 31e31b8a | bellard | #define TARGET_TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */ |
595 | 31e31b8a | bellard | |
596 | 31e31b8a | bellard | /* Used for packet mode */
|
597 | 31e31b8a | bellard | #define TARGET_TIOCPKT_DATA 0 |
598 | 31e31b8a | bellard | #define TARGET_TIOCPKT_FLUSHREAD 1 |
599 | 31e31b8a | bellard | #define TARGET_TIOCPKT_FLUSHWRITE 2 |
600 | 31e31b8a | bellard | #define TARGET_TIOCPKT_STOP 4 |
601 | 31e31b8a | bellard | #define TARGET_TIOCPKT_START 8 |
602 | 31e31b8a | bellard | #define TARGET_TIOCPKT_NOSTOP 16 |
603 | 31e31b8a | bellard | #define TARGET_TIOCPKT_DOSTOP 32 |
604 | 31e31b8a | bellard | |
605 | 31e31b8a | bellard | #define TARGET_TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
606 | 31e31b8a | bellard | |
607 | 31e31b8a | bellard | /* from asm/termbits.h */
|
608 | 31e31b8a | bellard | |
609 | 31e31b8a | bellard | #define TARGET_NCCS 19 |
610 | 31e31b8a | bellard | |
611 | 31e31b8a | bellard | struct target_termios {
|
612 | 31e31b8a | bellard | unsigned int c_iflag; /* input mode flags */ |
613 | 31e31b8a | bellard | unsigned int c_oflag; /* output mode flags */ |
614 | 31e31b8a | bellard | unsigned int c_cflag; /* control mode flags */ |
615 | 31e31b8a | bellard | unsigned int c_lflag; /* local mode flags */ |
616 | 31e31b8a | bellard | unsigned char c_line; /* line discipline */ |
617 | 31e31b8a | bellard | unsigned char c_cc[TARGET_NCCS]; /* control characters */ |
618 | 31e31b8a | bellard | }; |
619 | 31e31b8a | bellard | |
620 | 31e31b8a | bellard | /* c_iflag bits */
|
621 | 31e31b8a | bellard | #define TARGET_IGNBRK 0000001 |
622 | 31e31b8a | bellard | #define TARGET_BRKINT 0000002 |
623 | 31e31b8a | bellard | #define TARGET_IGNPAR 0000004 |
624 | 31e31b8a | bellard | #define TARGET_PARMRK 0000010 |
625 | 31e31b8a | bellard | #define TARGET_INPCK 0000020 |
626 | 31e31b8a | bellard | #define TARGET_ISTRIP 0000040 |
627 | 31e31b8a | bellard | #define TARGET_INLCR 0000100 |
628 | 31e31b8a | bellard | #define TARGET_IGNCR 0000200 |
629 | 31e31b8a | bellard | #define TARGET_ICRNL 0000400 |
630 | 31e31b8a | bellard | #define TARGET_IUCLC 0001000 |
631 | 31e31b8a | bellard | #define TARGET_IXON 0002000 |
632 | 31e31b8a | bellard | #define TARGET_IXANY 0004000 |
633 | 31e31b8a | bellard | #define TARGET_IXOFF 0010000 |
634 | 31e31b8a | bellard | #define TARGET_IMAXBEL 0020000 |
635 | 31e31b8a | bellard | |
636 | 31e31b8a | bellard | /* c_oflag bits */
|
637 | 31e31b8a | bellard | #define TARGET_OPOST 0000001 |
638 | 31e31b8a | bellard | #define TARGET_OLCUC 0000002 |
639 | 31e31b8a | bellard | #define TARGET_ONLCR 0000004 |
640 | 31e31b8a | bellard | #define TARGET_OCRNL 0000010 |
641 | 31e31b8a | bellard | #define TARGET_ONOCR 0000020 |
642 | 31e31b8a | bellard | #define TARGET_ONLRET 0000040 |
643 | 31e31b8a | bellard | #define TARGET_OFILL 0000100 |
644 | 31e31b8a | bellard | #define TARGET_OFDEL 0000200 |
645 | 31e31b8a | bellard | #define TARGET_NLDLY 0000400 |
646 | 31e31b8a | bellard | #define TARGET_NL0 0000000 |
647 | 31e31b8a | bellard | #define TARGET_NL1 0000400 |
648 | 31e31b8a | bellard | #define TARGET_CRDLY 0003000 |
649 | 31e31b8a | bellard | #define TARGET_CR0 0000000 |
650 | 31e31b8a | bellard | #define TARGET_CR1 0001000 |
651 | 31e31b8a | bellard | #define TARGET_CR2 0002000 |
652 | 31e31b8a | bellard | #define TARGET_CR3 0003000 |
653 | 31e31b8a | bellard | #define TARGET_TABDLY 0014000 |
654 | 31e31b8a | bellard | #define TARGET_TAB0 0000000 |
655 | 31e31b8a | bellard | #define TARGET_TAB1 0004000 |
656 | 31e31b8a | bellard | #define TARGET_TAB2 0010000 |
657 | 31e31b8a | bellard | #define TARGET_TAB3 0014000 |
658 | 31e31b8a | bellard | #define TARGET_XTABS 0014000 |
659 | 31e31b8a | bellard | #define TARGET_BSDLY 0020000 |
660 | 31e31b8a | bellard | #define TARGET_BS0 0000000 |
661 | 31e31b8a | bellard | #define TARGET_BS1 0020000 |
662 | 31e31b8a | bellard | #define TARGET_VTDLY 0040000 |
663 | 31e31b8a | bellard | #define TARGET_VT0 0000000 |
664 | 31e31b8a | bellard | #define TARGET_VT1 0040000 |
665 | 31e31b8a | bellard | #define TARGET_FFDLY 0100000 |
666 | 31e31b8a | bellard | #define TARGET_FF0 0000000 |
667 | 31e31b8a | bellard | #define TARGET_FF1 0100000 |
668 | 31e31b8a | bellard | |
669 | 31e31b8a | bellard | /* c_cflag bit meaning */
|
670 | 31e31b8a | bellard | #define TARGET_CBAUD 0010017 |
671 | 31e31b8a | bellard | #define TARGET_B0 0000000 /* hang up */ |
672 | 31e31b8a | bellard | #define TARGET_B50 0000001 |
673 | 31e31b8a | bellard | #define TARGET_B75 0000002 |
674 | 31e31b8a | bellard | #define TARGET_B110 0000003 |
675 | 31e31b8a | bellard | #define TARGET_B134 0000004 |
676 | 31e31b8a | bellard | #define TARGET_B150 0000005 |
677 | 31e31b8a | bellard | #define TARGET_B200 0000006 |
678 | 31e31b8a | bellard | #define TARGET_B300 0000007 |
679 | 31e31b8a | bellard | #define TARGET_B600 0000010 |
680 | 31e31b8a | bellard | #define TARGET_B1200 0000011 |
681 | 31e31b8a | bellard | #define TARGET_B1800 0000012 |
682 | 31e31b8a | bellard | #define TARGET_B2400 0000013 |
683 | 31e31b8a | bellard | #define TARGET_B4800 0000014 |
684 | 31e31b8a | bellard | #define TARGET_B9600 0000015 |
685 | 31e31b8a | bellard | #define TARGET_B19200 0000016 |
686 | 31e31b8a | bellard | #define TARGET_B38400 0000017 |
687 | 31e31b8a | bellard | #define TARGET_EXTA B19200
|
688 | 31e31b8a | bellard | #define TARGET_EXTB B38400
|
689 | 31e31b8a | bellard | #define TARGET_CSIZE 0000060 |
690 | 31e31b8a | bellard | #define TARGET_CS5 0000000 |
691 | 31e31b8a | bellard | #define TARGET_CS6 0000020 |
692 | 31e31b8a | bellard | #define TARGET_CS7 0000040 |
693 | 31e31b8a | bellard | #define TARGET_CS8 0000060 |
694 | 31e31b8a | bellard | #define TARGET_CSTOPB 0000100 |
695 | 31e31b8a | bellard | #define TARGET_CREAD 0000200 |
696 | 31e31b8a | bellard | #define TARGET_PARENB 0000400 |
697 | 31e31b8a | bellard | #define TARGET_PARODD 0001000 |
698 | 31e31b8a | bellard | #define TARGET_HUPCL 0002000 |
699 | 31e31b8a | bellard | #define TARGET_CLOCAL 0004000 |
700 | 31e31b8a | bellard | #define TARGET_CBAUDEX 0010000 |
701 | 31e31b8a | bellard | #define TARGET_B57600 0010001 |
702 | 31e31b8a | bellard | #define TARGET_B115200 0010002 |
703 | 31e31b8a | bellard | #define TARGET_B230400 0010003 |
704 | 31e31b8a | bellard | #define TARGET_B460800 0010004 |
705 | 31e31b8a | bellard | #define TARGET_CIBAUD 002003600000 /* input baud rate (not used) */ |
706 | 31e31b8a | bellard | #define TARGET_CRTSCTS 020000000000 /* flow control */ |
707 | 31e31b8a | bellard | |
708 | 31e31b8a | bellard | /* c_lflag bits */
|
709 | 31e31b8a | bellard | #define TARGET_ISIG 0000001 |
710 | 31e31b8a | bellard | #define TARGET_ICANON 0000002 |
711 | 31e31b8a | bellard | #define TARGET_XCASE 0000004 |
712 | 31e31b8a | bellard | #define TARGET_ECHO 0000010 |
713 | 31e31b8a | bellard | #define TARGET_ECHOE 0000020 |
714 | 31e31b8a | bellard | #define TARGET_ECHOK 0000040 |
715 | 31e31b8a | bellard | #define TARGET_ECHONL 0000100 |
716 | 31e31b8a | bellard | #define TARGET_NOFLSH 0000200 |
717 | 31e31b8a | bellard | #define TARGET_TOSTOP 0000400 |
718 | 31e31b8a | bellard | #define TARGET_ECHOCTL 0001000 |
719 | 31e31b8a | bellard | #define TARGET_ECHOPRT 0002000 |
720 | 31e31b8a | bellard | #define TARGET_ECHOKE 0004000 |
721 | 31e31b8a | bellard | #define TARGET_FLUSHO 0010000 |
722 | 31e31b8a | bellard | #define TARGET_PENDIN 0040000 |
723 | 31e31b8a | bellard | #define TARGET_IEXTEN 0100000 |
724 | 31e31b8a | bellard | |
725 | 31e31b8a | bellard | /* c_cc character offsets */
|
726 | 31e31b8a | bellard | #define TARGET_VINTR 0 |
727 | 31e31b8a | bellard | #define TARGET_VQUIT 1 |
728 | 31e31b8a | bellard | #define TARGET_VERASE 2 |
729 | 31e31b8a | bellard | #define TARGET_VKILL 3 |
730 | 31e31b8a | bellard | #define TARGET_VEOF 4 |
731 | 31e31b8a | bellard | #define TARGET_VTIME 5 |
732 | 31e31b8a | bellard | #define TARGET_VMIN 6 |
733 | 31e31b8a | bellard | #define TARGET_VSWTC 7 |
734 | 31e31b8a | bellard | #define TARGET_VSTART 8 |
735 | 31e31b8a | bellard | #define TARGET_VSTOP 9 |
736 | 31e31b8a | bellard | #define TARGET_VSUSP 10 |
737 | 31e31b8a | bellard | #define TARGET_VEOL 11 |
738 | 31e31b8a | bellard | #define TARGET_VREPRINT 12 |
739 | 31e31b8a | bellard | #define TARGET_VDISCARD 13 |
740 | 31e31b8a | bellard | #define TARGET_VWERASE 14 |
741 | 31e31b8a | bellard | #define TARGET_VLNEXT 15 |
742 | 31e31b8a | bellard | #define TARGET_VEOL2 16 |
743 | 31e31b8a | bellard | |
744 | 1a9353d2 | bellard | #define TARGET_LDT_ENTRIES 8192 |
745 | 1a9353d2 | bellard | #define TARGET_LDT_ENTRY_SIZE 8 |
746 | 1a9353d2 | bellard | |
747 | 7ed601b7 | bellard | #define TARGET_GDT_ENTRY_TLS_ENTRIES 3 |
748 | 7ed601b7 | bellard | #define TARGET_GDT_ENTRY_TLS_MIN 6 |
749 | 7ed601b7 | bellard | #define TARGET_GDT_ENTRY_TLS_MAX (TARGET_GDT_ENTRY_TLS_MIN + TARGET_GDT_ENTRY_TLS_ENTRIES - 1) |
750 | 7ed601b7 | bellard | |
751 | 1a9353d2 | bellard | struct target_modify_ldt_ldt_s {
|
752 | 1a9353d2 | bellard | unsigned int entry_number; |
753 | 1a9353d2 | bellard | target_ulong base_addr; |
754 | 1a9353d2 | bellard | unsigned int limit; |
755 | 1a9353d2 | bellard | unsigned int flags; |
756 | 1a9353d2 | bellard | }; |
757 | 1a9353d2 | bellard | |
758 | bc8a22cc | bellard | |
759 | bc8a22cc | bellard | /* vm86 defines */
|
760 | bc8a22cc | bellard | |
761 | bc8a22cc | bellard | #define TARGET_BIOSSEG 0x0f000 |
762 | bc8a22cc | bellard | |
763 | 7ed601b7 | bellard | #define TARGET_VM86_SIGNAL 0 /* return due to signal */ |
764 | 7ed601b7 | bellard | #define TARGET_VM86_UNKNOWN 1 /* unhandled GP fault - IO-instruction or similar */ |
765 | 7ed601b7 | bellard | #define TARGET_VM86_INTx 2 /* int3/int x instruction (ARG = x) */ |
766 | 7ed601b7 | bellard | #define TARGET_VM86_STI 3 /* sti/popf/iret instruction enabled virtual interrupts */ |
767 | 7ed601b7 | bellard | |
768 | 7ed601b7 | bellard | /*
|
769 | 7ed601b7 | bellard | * Additional return values when invoking new vm86()
|
770 | 7ed601b7 | bellard | */
|
771 | 7ed601b7 | bellard | #define TARGET_VM86_PICRETURN 4 /* return due to pending PIC request */ |
772 | 7ed601b7 | bellard | #define TARGET_VM86_TRAP 6 /* return due to DOS-debugger request */ |
773 | 7ed601b7 | bellard | |
774 | 7ed601b7 | bellard | /*
|
775 | 7ed601b7 | bellard | * function codes when invoking new vm86()
|
776 | 7ed601b7 | bellard | */
|
777 | 7ed601b7 | bellard | #define TARGET_VM86_PLUS_INSTALL_CHECK 0 |
778 | 7ed601b7 | bellard | #define TARGET_VM86_ENTER 1 |
779 | 7ed601b7 | bellard | #define TARGET_VM86_ENTER_NO_BYPASS 2 |
780 | 7ed601b7 | bellard | #define TARGET_VM86_REQUEST_IRQ 3 |
781 | 7ed601b7 | bellard | #define TARGET_VM86_FREE_IRQ 4 |
782 | 7ed601b7 | bellard | #define TARGET_VM86_GET_IRQ_BITS 5 |
783 | 7ed601b7 | bellard | #define TARGET_VM86_GET_AND_RESET_IRQ 6 |
784 | 7ed601b7 | bellard | |
785 | 7ed601b7 | bellard | /*
|
786 | 7ed601b7 | bellard | * This is the stack-layout seen by the user space program when we have
|
787 | 7ed601b7 | bellard | * done a translation of "SAVE_ALL" from vm86 mode. The real kernel layout
|
788 | 7ed601b7 | bellard | * is 'kernel_vm86_regs' (see below).
|
789 | 7ed601b7 | bellard | */
|
790 | 7ed601b7 | bellard | |
791 | 7ed601b7 | bellard | struct target_vm86_regs {
|
792 | 7ed601b7 | bellard | /*
|
793 | 7ed601b7 | bellard | * normal regs, with special meaning for the segment descriptors..
|
794 | 7ed601b7 | bellard | */
|
795 | 7ed601b7 | bellard | target_long ebx; |
796 | 7ed601b7 | bellard | target_long ecx; |
797 | 7ed601b7 | bellard | target_long edx; |
798 | 7ed601b7 | bellard | target_long esi; |
799 | 7ed601b7 | bellard | target_long edi; |
800 | 7ed601b7 | bellard | target_long ebp; |
801 | 7ed601b7 | bellard | target_long eax; |
802 | 7ed601b7 | bellard | target_long __null_ds; |
803 | 7ed601b7 | bellard | target_long __null_es; |
804 | 7ed601b7 | bellard | target_long __null_fs; |
805 | 7ed601b7 | bellard | target_long __null_gs; |
806 | 7ed601b7 | bellard | target_long orig_eax; |
807 | 7ed601b7 | bellard | target_long eip; |
808 | 7ed601b7 | bellard | unsigned short cs, __csh; |
809 | 7ed601b7 | bellard | target_long eflags; |
810 | 7ed601b7 | bellard | target_long esp; |
811 | 7ed601b7 | bellard | unsigned short ss, __ssh; |
812 | 7ed601b7 | bellard | /*
|
813 | 7ed601b7 | bellard | * these are specific to v86 mode:
|
814 | 7ed601b7 | bellard | */
|
815 | 7ed601b7 | bellard | unsigned short es, __esh; |
816 | 7ed601b7 | bellard | unsigned short ds, __dsh; |
817 | 7ed601b7 | bellard | unsigned short fs, __fsh; |
818 | 7ed601b7 | bellard | unsigned short gs, __gsh; |
819 | 7ed601b7 | bellard | }; |
820 | 7ed601b7 | bellard | |
821 | 7ed601b7 | bellard | struct target_revectored_struct {
|
822 | 7ed601b7 | bellard | target_ulong __map[8]; /* 256 bits */ |
823 | 7ed601b7 | bellard | }; |
824 | 7ed601b7 | bellard | |
825 | 7ed601b7 | bellard | struct target_vm86_struct {
|
826 | 7ed601b7 | bellard | struct target_vm86_regs regs;
|
827 | 7ed601b7 | bellard | target_ulong flags; |
828 | 7ed601b7 | bellard | target_ulong screen_bitmap; |
829 | 7ed601b7 | bellard | target_ulong cpu_type; |
830 | 7ed601b7 | bellard | struct target_revectored_struct int_revectored;
|
831 | 7ed601b7 | bellard | struct target_revectored_struct int21_revectored;
|
832 | 7ed601b7 | bellard | }; |
833 | 7ed601b7 | bellard | |
834 | 7ed601b7 | bellard | /*
|
835 | 7ed601b7 | bellard | * flags masks
|
836 | 7ed601b7 | bellard | */
|
837 | 7ed601b7 | bellard | #define TARGET_VM86_SCREEN_BITMAP 0x0001 |
838 | 7ed601b7 | bellard | |
839 | 7ed601b7 | bellard | struct target_vm86plus_info_struct {
|
840 | 7ed601b7 | bellard | target_ulong flags; |
841 | 7ed601b7 | bellard | #define TARGET_force_return_for_pic (1 << 0) |
842 | 7ed601b7 | bellard | #define TARGET_vm86dbg_active (1 << 1) /* for debugger */ |
843 | 7ed601b7 | bellard | #define TARGET_vm86dbg_TFpendig (1 << 2) /* for debugger */ |
844 | 7ed601b7 | bellard | #define TARGET_is_vm86pus (1 << 31) /* for vm86 internal use */ |
845 | 7ed601b7 | bellard | unsigned char vm86dbg_intxxtab[32]; /* for debugger */ |
846 | 7ed601b7 | bellard | }; |
847 | 7ed601b7 | bellard | |
848 | 7ed601b7 | bellard | struct target_vm86plus_struct {
|
849 | 7ed601b7 | bellard | struct target_vm86_regs regs;
|
850 | 7ed601b7 | bellard | target_ulong flags; |
851 | 7ed601b7 | bellard | target_ulong screen_bitmap; |
852 | 7ed601b7 | bellard | target_ulong cpu_type; |
853 | 7ed601b7 | bellard | struct target_revectored_struct int_revectored;
|
854 | 7ed601b7 | bellard | struct target_revectored_struct int21_revectored;
|
855 | 7ed601b7 | bellard | struct target_vm86plus_info_struct vm86plus;
|
856 | 7ed601b7 | bellard | }; |
857 | 7ed601b7 | bellard | |
858 | 7ed601b7 | bellard | /* ipcs */
|
859 | 7ed601b7 | bellard | |
860 | 7ed601b7 | bellard | #define TARGET_SEMOP 1 |
861 | 7ed601b7 | bellard | #define TARGET_SEMGET 2 |
862 | 7ed601b7 | bellard | #define TARGET_SEMCTL 3 |
863 | 7ed601b7 | bellard | #define TARGET_MSGSND 11 |
864 | 7ed601b7 | bellard | #define TARGET_MSGRCV 12 |
865 | 7ed601b7 | bellard | #define TARGET_MSGGET 13 |
866 | 7ed601b7 | bellard | #define TARGET_MSGCTL 14 |
867 | 7ed601b7 | bellard | #define TARGET_SHMAT 21 |
868 | 7ed601b7 | bellard | #define TARGET_SHMDT 22 |
869 | 7ed601b7 | bellard | #define TARGET_SHMGET 23 |
870 | 7ed601b7 | bellard | #define TARGET_SHMCTL 24 |
871 | 7ed601b7 | bellard | |
872 | 7ed601b7 | bellard | struct target_msgbuf {
|
873 | 7ed601b7 | bellard | int mtype;
|
874 | 7ed601b7 | bellard | char mtext[1]; |
875 | 7ed601b7 | bellard | }; |
876 | 7ed601b7 | bellard | |
877 | 7ed601b7 | bellard | struct target_ipc_kludge {
|
878 | 7ed601b7 | bellard | unsigned int msgp; /* Really (struct msgbuf *) */ |
879 | 7ed601b7 | bellard | int msgtyp;
|
880 | 7ed601b7 | bellard | }; |
881 | 7ed601b7 | bellard | |
882 | 7ed601b7 | bellard | struct alpha_msgbuf {
|
883 | 7ed601b7 | bellard | long mtype;
|
884 | 7ed601b7 | bellard | char mtext[4096]; |
885 | 7ed601b7 | bellard | }; |
886 | 7ed601b7 | bellard | |
887 | 7ed601b7 | bellard | struct target_ipc_perm {
|
888 | 7ed601b7 | bellard | int key;
|
889 | 7ed601b7 | bellard | unsigned short uid; |
890 | 7ed601b7 | bellard | unsigned short gid; |
891 | 7ed601b7 | bellard | unsigned short cuid; |
892 | 7ed601b7 | bellard | unsigned short cgid; |
893 | 7ed601b7 | bellard | unsigned short mode; |
894 | 7ed601b7 | bellard | unsigned short seq; |
895 | 7ed601b7 | bellard | }; |
896 | 7ed601b7 | bellard | |
897 | 7ed601b7 | bellard | struct target_msqid_ds {
|
898 | 7ed601b7 | bellard | struct target_ipc_perm msg_perm;
|
899 | 7ed601b7 | bellard | unsigned int msg_first; /* really struct target_msg* */ |
900 | 7ed601b7 | bellard | unsigned int msg_last; /* really struct target_msg* */ |
901 | 7ed601b7 | bellard | unsigned int msg_stime; /* really target_time_t */ |
902 | 7ed601b7 | bellard | unsigned int msg_rtime; /* really target_time_t */ |
903 | 7ed601b7 | bellard | unsigned int msg_ctime; /* really target_time_t */ |
904 | 7ed601b7 | bellard | unsigned int wwait; /* really struct wait_queue* */ |
905 | 7ed601b7 | bellard | unsigned int rwait; /* really struct wait_queue* */ |
906 | 7ed601b7 | bellard | unsigned short msg_cbytes; |
907 | 7ed601b7 | bellard | unsigned short msg_qnum; |
908 | 7ed601b7 | bellard | unsigned short msg_qbytes; |
909 | 7ed601b7 | bellard | unsigned short msg_lspid; |
910 | 7ed601b7 | bellard | unsigned short msg_lrpid; |
911 | 7ed601b7 | bellard | }; |
912 | 7ed601b7 | bellard | |
913 | 7ed601b7 | bellard | struct target_shmid_ds {
|
914 | 7ed601b7 | bellard | struct target_ipc_perm shm_perm;
|
915 | 7ed601b7 | bellard | int shm_segsz;
|
916 | 7ed601b7 | bellard | unsigned int shm_atime; /* really target_time_t */ |
917 | 7ed601b7 | bellard | unsigned int shm_dtime; /* really target_time_t */ |
918 | 7ed601b7 | bellard | unsigned int shm_ctime; /* really target_time_t */ |
919 | 7ed601b7 | bellard | unsigned short shm_cpid; |
920 | 7ed601b7 | bellard | unsigned short shm_lpid; |
921 | 7ed601b7 | bellard | short shm_nattch;
|
922 | 7ed601b7 | bellard | unsigned short shm_npages; |
923 | 7ed601b7 | bellard | unsigned long *shm_pages; |
924 | 7ed601b7 | bellard | void *attaches; /* really struct shm_desc * */ |
925 | 7ed601b7 | bellard | }; |
926 | 7ed601b7 | bellard | |
927 | 7ed601b7 | bellard | #define TARGET_IPC_RMID 0 |
928 | 7ed601b7 | bellard | #define TARGET_IPC_SET 1 |
929 | 7ed601b7 | bellard | #define TARGET_IPC_STAT 2 |
930 | 7ed601b7 | bellard | |
931 | 7ed601b7 | bellard | union target_semun {
|
932 | 7ed601b7 | bellard | int val;
|
933 | 7ed601b7 | bellard | unsigned int buf; /* really struct semid_ds * */ |
934 | 7ed601b7 | bellard | unsigned int array; /* really unsigned short * */ |
935 | 7ed601b7 | bellard | unsigned int __buf; /* really struct seminfo * */ |
936 | 7ed601b7 | bellard | unsigned int __pad; /* really void* */ |
937 | 7ed601b7 | bellard | }; |
938 | 7ed601b7 | bellard | |
939 | fe1e3ce3 | bellard | #define TARGET_F_DUPFD 0 /* dup */ |
940 | fe1e3ce3 | bellard | #define TARGET_F_GETFD 1 /* get close_on_exec */ |
941 | fe1e3ce3 | bellard | #define TARGET_F_SETFD 2 /* set/clear close_on_exec */ |
942 | fe1e3ce3 | bellard | #define TARGET_F_GETFL 3 /* get file->f_flags */ |
943 | fe1e3ce3 | bellard | #define TARGET_F_SETFL 4 /* set file->f_flags */ |
944 | fe1e3ce3 | bellard | #define TARGET_F_GETLK 5 |
945 | fe1e3ce3 | bellard | #define TARGET_F_SETLK 6 |
946 | fe1e3ce3 | bellard | #define TARGET_F_SETLKW 7 |
947 | fe1e3ce3 | bellard | |
948 | fe1e3ce3 | bellard | #define TARGET_F_SETOWN 8 /* for sockets. */ |
949 | fe1e3ce3 | bellard | #define TARGET_F_GETOWN 9 /* for sockets. */ |
950 | fe1e3ce3 | bellard | #define TARGET_F_SETSIG 10 /* for sockets. */ |
951 | fe1e3ce3 | bellard | #define TARGET_F_GETSIG 11 /* for sockets. */ |
952 | fe1e3ce3 | bellard | |
953 | fe1e3ce3 | bellard | #define TARGET_F_GETLK64 12 /* using 'struct flock64' */ |
954 | fe1e3ce3 | bellard | #define TARGET_F_SETLK64 13 |
955 | fe1e3ce3 | bellard | #define TARGET_F_SETLKW64 14 |
956 | fe1e3ce3 | bellard | |
957 | ae48a073 | bellard | struct target_flock {
|
958 | ae48a073 | bellard | short l_type;
|
959 | ae48a073 | bellard | short l_whence;
|
960 | ae48a073 | bellard | target_ulong l_start; |
961 | ae48a073 | bellard | target_ulong l_len; |
962 | ae48a073 | bellard | int l_pid;
|
963 | ae48a073 | bellard | }; |
964 | ae48a073 | bellard | |
965 | ae48a073 | bellard | struct target_flock64 {
|
966 | ae48a073 | bellard | short l_type;
|
967 | ae48a073 | bellard | short l_whence;
|
968 | ae48a073 | bellard | unsigned long long l_start; |
969 | ae48a073 | bellard | unsigned long long l_len; |
970 | ae48a073 | bellard | int l_pid;
|
971 | ae48a073 | bellard | }; |
972 | ae48a073 | bellard | |
973 | 31e31b8a | bellard | /* soundcard defines (XXX: move them to generic file syscall_defs.h) */
|
974 | 31e31b8a | bellard | |
975 | 31e31b8a | bellard | #define TARGET_SNDCTL_COPR_HALT 0xc0144307 |
976 | 31e31b8a | bellard | #define TARGET_SNDCTL_COPR_LOAD 0xcfb04301 |
977 | 31e31b8a | bellard | #define TARGET_SNDCTL_COPR_RCODE 0xc0144303 |
978 | 31e31b8a | bellard | #define TARGET_SNDCTL_COPR_RCVMSG 0x8fa44309 |
979 | 31e31b8a | bellard | #define TARGET_SNDCTL_COPR_RDATA 0xc0144302 |
980 | 31e31b8a | bellard | #define TARGET_SNDCTL_COPR_RESET 0x00004300 |
981 | 31e31b8a | bellard | #define TARGET_SNDCTL_COPR_RUN 0xc0144306 |
982 | 31e31b8a | bellard | #define TARGET_SNDCTL_COPR_SENDMSG 0xcfa44308 |
983 | 31e31b8a | bellard | #define TARGET_SNDCTL_COPR_WCODE 0x40144305 |
984 | 31e31b8a | bellard | #define TARGET_SNDCTL_COPR_WDATA 0x40144304 |
985 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_CHANNELS 0xc0045006 |
986 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_GETBLKSIZE 0xc0045004 |
987 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_GETCAPS 0x8004500f |
988 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_GETFMTS 0x8004500b |
989 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_GETIPTR 0x800c5011 |
990 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_GETISPACE 0x8010500d |
991 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_GETOPTR 0x800c5012 |
992 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_GETOSPACE 0x8010500c |
993 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_GETTRIGGER 0x80045010 |
994 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_MAPINBUF 0x80085013 |
995 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_MAPOUTBUF 0x80085014 |
996 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_NONBLOCK 0x0000500e |
997 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_POST 0x00005008 |
998 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_RESET 0x00005000 |
999 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_SAMPLESIZE 0xc0045005 |
1000 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_SETDUPLEX 0x00005016 |
1001 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_SETFMT 0xc0045005 |
1002 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_SETFRAGMENT 0xc004500a |
1003 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_SETSYNCRO 0x00005015 |
1004 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_SETTRIGGER 0x40045010 |
1005 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_SPEED 0xc0045002 |
1006 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_STEREO 0xc0045003 |
1007 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_SUBDIVIDE 0xc0045009 |
1008 | 31e31b8a | bellard | #define TARGET_SNDCTL_DSP_SYNC 0x00005001 |
1009 | 31e31b8a | bellard | #define TARGET_SNDCTL_FM_4OP_ENABLE 0x4004510f |
1010 | 31e31b8a | bellard | #define TARGET_SNDCTL_FM_LOAD_INSTR 0x40285107 |
1011 | 31e31b8a | bellard | #define TARGET_SNDCTL_MIDI_INFO 0xc074510c |
1012 | 31e31b8a | bellard | #define TARGET_SNDCTL_MIDI_MPUCMD 0xc0216d02 |
1013 | 31e31b8a | bellard | #define TARGET_SNDCTL_MIDI_MPUMODE 0xc0046d01 |
1014 | 31e31b8a | bellard | #define TARGET_SNDCTL_MIDI_PRETIME 0xc0046d00 |
1015 | 31e31b8a | bellard | #define TARGET_SNDCTL_PMGR_ACCESS 0xcfb85110 |
1016 | 31e31b8a | bellard | #define TARGET_SNDCTL_PMGR_IFACE 0xcfb85001 |
1017 | 31e31b8a | bellard | #define TARGET_SNDCTL_SEQ_CTRLRATE 0xc0045103 |
1018 | 31e31b8a | bellard | #define TARGET_SNDCTL_SEQ_GETINCOUNT 0x80045105 |
1019 | 31e31b8a | bellard | #define TARGET_SNDCTL_SEQ_GETOUTCOUNT 0x80045104 |
1020 | 31e31b8a | bellard | #define TARGET_SNDCTL_SEQ_NRMIDIS 0x8004510b |
1021 | 31e31b8a | bellard | #define TARGET_SNDCTL_SEQ_NRSYNTHS 0x8004510a |
1022 | 31e31b8a | bellard | #define TARGET_SNDCTL_SEQ_OUTOFBAND 0x40085112 |
1023 | 31e31b8a | bellard | #define TARGET_SNDCTL_SEQ_PANIC 0x00005111 |
1024 | 31e31b8a | bellard | #define TARGET_SNDCTL_SEQ_PERCMODE 0x40045106 |
1025 | 31e31b8a | bellard | #define TARGET_SNDCTL_SEQ_RESET 0x00005100 |
1026 | 31e31b8a | bellard | #define TARGET_SNDCTL_SEQ_RESETSAMPLES 0x40045109 |
1027 | 31e31b8a | bellard | #define TARGET_SNDCTL_SEQ_SYNC 0x00005101 |
1028 | 31e31b8a | bellard | #define TARGET_SNDCTL_SEQ_TESTMIDI 0x40045108 |
1029 | 31e31b8a | bellard | #define TARGET_SNDCTL_SEQ_THRESHOLD 0x4004510d |
1030 | 31e31b8a | bellard | #define TARGET_SNDCTL_SEQ_TRESHOLD 0x4004510d |
1031 | 31e31b8a | bellard | #define TARGET_SNDCTL_SYNTH_INFO 0xc08c5102 |
1032 | 31e31b8a | bellard | #define TARGET_SNDCTL_SYNTH_MEMAVL 0xc004510e |
1033 | 31e31b8a | bellard | #define TARGET_SNDCTL_TMR_CONTINUE 0x00005404 |
1034 | 31e31b8a | bellard | #define TARGET_SNDCTL_TMR_METRONOME 0x40045407 |
1035 | 31e31b8a | bellard | #define TARGET_SNDCTL_TMR_SELECT 0x40045408 |
1036 | 31e31b8a | bellard | #define TARGET_SNDCTL_TMR_SOURCE 0xc0045406 |
1037 | 31e31b8a | bellard | #define TARGET_SNDCTL_TMR_START 0x00005402 |
1038 | 31e31b8a | bellard | #define TARGET_SNDCTL_TMR_STOP 0x00005403 |
1039 | 31e31b8a | bellard | #define TARGET_SNDCTL_TMR_TEMPO 0xc0045405 |
1040 | 31e31b8a | bellard | #define TARGET_SNDCTL_TMR_TIMEBASE 0xc0045401 |
1041 | 31e31b8a | bellard | #define TARGET_SOUND_PCM_WRITE_FILTER 0xc0045007 |
1042 | 31e31b8a | bellard | #define TARGET_SOUND_PCM_READ_RATE 0x80045002 |
1043 | 31e31b8a | bellard | #define TARGET_SOUND_PCM_READ_CHANNELS 0x80045006 |
1044 | 31e31b8a | bellard | #define TARGET_SOUND_PCM_READ_BITS 0x80045005 |
1045 | 31e31b8a | bellard | #define TARGET_SOUND_PCM_READ_FILTER 0x80045007 |
1046 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_INFO 0x80304d65 |
1047 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_ACCESS 0xc0804d66 |
1048 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_PRIVATE1 0xc0044d6f |
1049 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_PRIVATE2 0xc0044d70 |
1050 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_PRIVATE3 0xc0044d71 |
1051 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_PRIVATE4 0xc0044d72 |
1052 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_PRIVATE5 0xc0044d73 |
1053 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_VOLUME 0x80044d00 |
1054 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_BASS 0x80044d01 |
1055 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_TREBLE 0x80044d02 |
1056 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_SYNTH 0x80044d03 |
1057 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_PCM 0x80044d04 |
1058 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_SPEAKER 0x80044d05 |
1059 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_LINE 0x80044d06 |
1060 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_MIC 0x80044d07 |
1061 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_CD 0x80044d08 |
1062 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_IMIX 0x80044d09 |
1063 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_ALTPCM 0x80044d0a |
1064 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_RECLEV 0x80044d0b |
1065 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_IGAIN 0x80044d0c |
1066 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_OGAIN 0x80044d0d |
1067 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_LINE1 0x80044d0e |
1068 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_LINE2 0x80044d0f |
1069 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_LINE3 0x80044d10 |
1070 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_MUTE 0x80044d1f |
1071 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_ENHANCE 0x80044d1f |
1072 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_LOUD 0x80044d1f |
1073 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_RECSRC 0x80044dff |
1074 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_DEVMASK 0x80044dfe |
1075 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_RECMASK 0x80044dfd |
1076 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_STEREODEVS 0x80044dfb |
1077 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_READ_CAPS 0x80044dfc |
1078 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_WRITE_VOLUME 0xc0044d00 |
1079 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_WRITE_BASS 0xc0044d01 |
1080 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_WRITE_TREBLE 0xc0044d02 |
1081 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_WRITE_SYNTH 0xc0044d03 |
1082 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_WRITE_PCM 0xc0044d04 |
1083 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_WRITE_SPEAKER 0xc0044d05 |
1084 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_WRITE_LINE 0xc0044d06 |
1085 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_WRITE_MIC 0xc0044d07 |
1086 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_WRITE_CD 0xc0044d08 |
1087 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_WRITE_IMIX 0xc0044d09 |
1088 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_WRITE_ALTPCM 0xc0044d0a |
1089 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_WRITE_RECLEV 0xc0044d0b |
1090 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_WRITE_IGAIN 0xc0044d0c |
1091 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_WRITE_OGAIN 0xc0044d0d |
1092 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_WRITE_LINE1 0xc0044d0e |
1093 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_WRITE_LINE2 0xc0044d0f |
1094 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_WRITE_LINE3 0xc0044d10 |
1095 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_WRITE_MUTE 0xc0044d1f |
1096 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_WRITE_ENHANCE 0xc0044d1f |
1097 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_WRITE_LOUD 0xc0044d1f |
1098 | 31e31b8a | bellard | #define TARGET_SOUND_MIXER_WRITE_RECSRC 0xc0044dff |
1099 | 6dbad63e | bellard | |
1100 | 1a9353d2 | bellard | #define TARGET_VFAT_IOCTL_READDIR_BOTH 0x82187201 |
1101 | 1a9353d2 | bellard | #define TARGET_VFAT_IOCTL_READDIR_SHORT 0x82187202 |
1102 | 32f36bce | bellard | |
1103 | 32f36bce | bellard | #define TARGET_SIOCATMARK 0x8905 |