root / linux-user / syscall_defs.h @ a8d3431a
History | View | Annotate | Download (47 kB)
1 |
/* common syscall defines for all architectures */
|
---|---|
2 |
|
3 |
/* Note: although the syscall numbers change between architectures,
|
4 |
most of them stay the same, so we handle it by puting ifdefs if
|
5 |
necessary */
|
6 |
|
7 |
#include "syscall_nr.h" |
8 |
|
9 |
#define SOCKOP_socket 1 |
10 |
#define SOCKOP_bind 2 |
11 |
#define SOCKOP_connect 3 |
12 |
#define SOCKOP_listen 4 |
13 |
#define SOCKOP_accept 5 |
14 |
#define SOCKOP_getsockname 6 |
15 |
#define SOCKOP_getpeername 7 |
16 |
#define SOCKOP_socketpair 8 |
17 |
#define SOCKOP_send 9 |
18 |
#define SOCKOP_recv 10 |
19 |
#define SOCKOP_sendto 11 |
20 |
#define SOCKOP_recvfrom 12 |
21 |
#define SOCKOP_shutdown 13 |
22 |
#define SOCKOP_setsockopt 14 |
23 |
#define SOCKOP_getsockopt 15 |
24 |
#define SOCKOP_sendmsg 16 |
25 |
#define SOCKOP_recvmsg 17 |
26 |
|
27 |
#define IPCOP_semop 1 |
28 |
#define IPCOP_semget 2 |
29 |
#define IPCOP_semctl 3 |
30 |
#define IPCOP_semtimedop 4 |
31 |
#define IPCOP_msgsnd 11 |
32 |
#define IPCOP_msgrcv 12 |
33 |
#define IPCOP_msgget 13 |
34 |
#define IPCOP_msgctl 14 |
35 |
#define IPCOP_shmat 21 |
36 |
#define IPCOP_shmdt 22 |
37 |
#define IPCOP_shmget 23 |
38 |
#define IPCOP_shmctl 24 |
39 |
|
40 |
/*
|
41 |
* The following is for compatibility across the various Linux
|
42 |
* platforms. The i386 ioctl numbering scheme doesn't really enforce
|
43 |
* a type field. De facto, however, the top 8 bits of the lower 16
|
44 |
* bits are indeed used as a type field, so we might just as well make
|
45 |
* this explicit here. Please be sure to use the decoding macros
|
46 |
* below from now on.
|
47 |
*/
|
48 |
#define TARGET_IOC_NRBITS 8 |
49 |
#define TARGET_IOC_TYPEBITS 8 |
50 |
|
51 |
#if defined(TARGET_I386) || defined(TARGET_ARM)
|
52 |
|
53 |
#define TARGET_IOC_SIZEBITS 14 |
54 |
#define TARGET_IOC_DIRBITS 2 |
55 |
|
56 |
#define TARGET_IOC_NONE 0U |
57 |
#define TARGET_IOC_WRITE 1U |
58 |
#define TARGET_IOC_READ 2U |
59 |
|
60 |
#elif defined(TARGET_PPC) || defined(TARGET_ALPHA) || defined(TARGET_SPARC)
|
61 |
|
62 |
#define TARGET_IOC_SIZEBITS 13 |
63 |
#define TARGET_IOC_DIRBITS 3 |
64 |
|
65 |
#define TARGET_IOC_NONE 1U |
66 |
#define TARGET_IOC_READ 2U |
67 |
#define TARGET_IOC_WRITE 4U |
68 |
|
69 |
#else
|
70 |
#error unsupported CPU
|
71 |
#endif
|
72 |
|
73 |
#define TARGET_IOC_NRMASK ((1 << TARGET_IOC_NRBITS)-1) |
74 |
#define TARGET_IOC_TYPEMASK ((1 << TARGET_IOC_TYPEBITS)-1) |
75 |
#define TARGET_IOC_SIZEMASK ((1 << TARGET_IOC_SIZEBITS)-1) |
76 |
#define TARGET_IOC_DIRMASK ((1 << TARGET_IOC_DIRBITS)-1) |
77 |
|
78 |
#define TARGET_IOC_NRSHIFT 0 |
79 |
#define TARGET_IOC_TYPESHIFT (TARGET_IOC_NRSHIFT+TARGET_IOC_NRBITS)
|
80 |
#define TARGET_IOC_SIZESHIFT (TARGET_IOC_TYPESHIFT+TARGET_IOC_TYPEBITS)
|
81 |
#define TARGET_IOC_DIRSHIFT (TARGET_IOC_SIZESHIFT+TARGET_IOC_SIZEBITS)
|
82 |
|
83 |
#define TARGET_IOC(dir,type,nr,size) \
|
84 |
(((dir) << TARGET_IOC_DIRSHIFT) | \ |
85 |
((type) << TARGET_IOC_TYPESHIFT) | \ |
86 |
((nr) << TARGET_IOC_NRSHIFT) | \ |
87 |
((size) << TARGET_IOC_SIZESHIFT)) |
88 |
|
89 |
/* used to create numbers */
|
90 |
#define TARGET_IO(type,nr) TARGET_IOC(TARGET_IOC_NONE,(type),(nr),0) |
91 |
#define TARGET_IOR(type,nr,size) TARGET_IOC(TARGET_IOC_READ,(type),(nr),sizeof(size)) |
92 |
#define TARGET_IOW(type,nr,size) TARGET_IOC(TARGET_IOC_WRITE,(type),(nr),sizeof(size)) |
93 |
#define TARGET_IOWR(type,nr,size) TARGET_IOC(TARGET_IOC_READ|TARGET_IOC_WRITE,(type),(nr),sizeof(size)) |
94 |
|
95 |
/* the size is automatically computed for these defines */
|
96 |
#define TARGET_IORU(type,nr) TARGET_IOC(TARGET_IOC_READ,(type),(nr),TARGET_IOC_SIZEMASK)
|
97 |
#define TARGET_IOWU(type,nr) TARGET_IOC(TARGET_IOC_WRITE,(type),(nr),TARGET_IOC_SIZEMASK)
|
98 |
#define TARGET_IOWRU(type,nr) TARGET_IOC(TARGET_IOC_READ|TARGET_IOC_WRITE,(type),(nr),TARGET_IOC_SIZEMASK)
|
99 |
|
100 |
struct target_sockaddr {
|
101 |
uint16_t sa_family; |
102 |
uint8_t sa_data[14];
|
103 |
}; |
104 |
|
105 |
struct target_timeval {
|
106 |
target_long tv_sec; |
107 |
target_long tv_usec; |
108 |
}; |
109 |
|
110 |
struct target_timespec {
|
111 |
target_long tv_sec; |
112 |
target_long tv_nsec; |
113 |
}; |
114 |
|
115 |
struct target_itimerval {
|
116 |
struct target_timeval it_interval;
|
117 |
struct target_timeval it_value;
|
118 |
}; |
119 |
|
120 |
typedef target_long target_clock_t;
|
121 |
|
122 |
#define TARGET_HZ 100 |
123 |
|
124 |
struct target_tms {
|
125 |
target_clock_t tms_utime; |
126 |
target_clock_t tms_stime; |
127 |
target_clock_t tms_cutime; |
128 |
target_clock_t tms_cstime; |
129 |
}; |
130 |
|
131 |
struct target_utimbuf {
|
132 |
target_long actime; |
133 |
target_long modtime; |
134 |
}; |
135 |
|
136 |
struct target_sel_arg_struct {
|
137 |
target_long n; |
138 |
target_long inp, outp, exp; |
139 |
target_long tvp; |
140 |
}; |
141 |
|
142 |
struct target_iovec {
|
143 |
target_long iov_base; /* Starting address */
|
144 |
target_long iov_len; /* Number of bytes */
|
145 |
}; |
146 |
|
147 |
struct target_msghdr {
|
148 |
target_long msg_name; /* Socket name */
|
149 |
int msg_namelen; /* Length of name */ |
150 |
target_long msg_iov; /* Data blocks */
|
151 |
target_long msg_iovlen; /* Number of blocks */
|
152 |
target_long msg_control; /* Per protocol magic (eg BSD file descriptor passing) */
|
153 |
target_long msg_controllen; /* Length of cmsg list */
|
154 |
unsigned int msg_flags; |
155 |
}; |
156 |
|
157 |
struct target_cmsghdr {
|
158 |
target_long cmsg_len; |
159 |
int cmsg_level;
|
160 |
int cmsg_type;
|
161 |
}; |
162 |
|
163 |
#define TARGET_CMSG_DATA(cmsg) ((unsigned char *) ((struct target_cmsghdr *) (cmsg) + 1)) |
164 |
#define TARGET_CMSG_NXTHDR(mhdr, cmsg) __target_cmsg_nxthdr (mhdr, cmsg)
|
165 |
#define TARGET_CMSG_FIRSTHDR(mhdr) \
|
166 |
((size_t) tswapl((mhdr)->msg_controllen) >= sizeof (struct target_cmsghdr) \ |
167 |
? (struct target_cmsghdr *) tswapl((mhdr)->msg_control) : (struct target_cmsghdr *) NULL) |
168 |
#define TARGET_CMSG_ALIGN(len) (((len) + sizeof (target_long) - 1) \ |
169 |
& (size_t) ~(sizeof (target_long) - 1)) |
170 |
#define TARGET_CMSG_SPACE(len) (TARGET_CMSG_ALIGN (len) \
|
171 |
+ TARGET_CMSG_ALIGN (sizeof (struct target_cmsghdr))) |
172 |
#define TARGET_CMSG_LEN(len) (TARGET_CMSG_ALIGN (sizeof (struct target_cmsghdr)) + (len)) |
173 |
|
174 |
static __inline__ struct target_cmsghdr * |
175 |
__target_cmsg_nxthdr (struct target_msghdr *__mhdr, struct target_cmsghdr *__cmsg) |
176 |
{ |
177 |
if (tswapl(__cmsg->cmsg_len) < sizeof (struct target_cmsghdr)) |
178 |
/* The kernel header does this so there may be a reason. */
|
179 |
return 0; |
180 |
|
181 |
__cmsg = (struct target_cmsghdr *) ((unsigned char *) __cmsg |
182 |
+ TARGET_CMSG_ALIGN (tswapl(__cmsg->cmsg_len))); |
183 |
if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) tswapl(__mhdr->msg_control) |
184 |
+ tswapl(__mhdr->msg_controllen)) |
185 |
|| ((unsigned char *) __cmsg + TARGET_CMSG_ALIGN (tswapl(__cmsg->cmsg_len)) |
186 |
> ((unsigned char *) tswapl(__mhdr->msg_control) |
187 |
+ tswapl(__mhdr->msg_controllen)))) |
188 |
/* No more entries. */
|
189 |
return 0; |
190 |
return __cmsg;
|
191 |
} |
192 |
|
193 |
|
194 |
struct target_rusage {
|
195 |
struct target_timeval ru_utime; /* user time used */ |
196 |
struct target_timeval ru_stime; /* system time used */ |
197 |
target_long ru_maxrss; /* maximum resident set size */
|
198 |
target_long ru_ixrss; /* integral shared memory size */
|
199 |
target_long ru_idrss; /* integral unshared data size */
|
200 |
target_long ru_isrss; /* integral unshared stack size */
|
201 |
target_long ru_minflt; /* page reclaims */
|
202 |
target_long ru_majflt; /* page faults */
|
203 |
target_long ru_nswap; /* swaps */
|
204 |
target_long ru_inblock; /* block input operations */
|
205 |
target_long ru_oublock; /* block output operations */
|
206 |
target_long ru_msgsnd; /* messages sent */
|
207 |
target_long ru_msgrcv; /* messages received */
|
208 |
target_long ru_nsignals; /* signals received */
|
209 |
target_long ru_nvcsw; /* voluntary context switches */
|
210 |
target_long ru_nivcsw; /* involuntary " */
|
211 |
}; |
212 |
|
213 |
typedef struct { |
214 |
int val[2]; |
215 |
} kernel_fsid_t; |
216 |
|
217 |
struct kernel_statfs {
|
218 |
int f_type;
|
219 |
int f_bsize;
|
220 |
int f_blocks;
|
221 |
int f_bfree;
|
222 |
int f_bavail;
|
223 |
int f_files;
|
224 |
int f_ffree;
|
225 |
kernel_fsid_t f_fsid; |
226 |
int f_namelen;
|
227 |
int f_spare[6]; |
228 |
}; |
229 |
|
230 |
struct target_dirent {
|
231 |
target_long d_ino; |
232 |
target_long d_off; |
233 |
unsigned short d_reclen; |
234 |
char d_name[256]; /* We must not include limits.h! */ |
235 |
}; |
236 |
|
237 |
struct target_dirent64 {
|
238 |
uint64_t d_ino; |
239 |
int64_t d_off; |
240 |
unsigned short d_reclen; |
241 |
unsigned char d_type; |
242 |
char d_name[256]; |
243 |
}; |
244 |
|
245 |
|
246 |
/* mostly generic signal stuff */
|
247 |
#define TARGET_SIG_DFL ((target_long)0) /* default signal handling */ |
248 |
#define TARGET_SIG_IGN ((target_long)1) /* ignore signal */ |
249 |
#define TARGET_SIG_ERR ((target_long)-1) /* error return from signal */ |
250 |
|
251 |
#ifdef TARGET_MIPS
|
252 |
#define TARGET_NSIG 128 |
253 |
#else
|
254 |
#define TARGET_NSIG 64 |
255 |
#endif
|
256 |
#define TARGET_NSIG_BPW TARGET_LONG_BITS
|
257 |
#define TARGET_NSIG_WORDS (TARGET_NSIG / TARGET_NSIG_BPW)
|
258 |
|
259 |
typedef struct { |
260 |
target_ulong sig[TARGET_NSIG_WORDS]; |
261 |
} target_sigset_t; |
262 |
|
263 |
#ifdef BSWAP_NEEDED
|
264 |
static inline void tswap_sigset(target_sigset_t *d, const target_sigset_t *s) |
265 |
{ |
266 |
int i;
|
267 |
for(i = 0;i < TARGET_NSIG_WORDS; i++) |
268 |
d->sig[i] = tswapl(s->sig[i]); |
269 |
} |
270 |
#else
|
271 |
static inline void tswap_sigset(target_sigset_t *d, const target_sigset_t *s) |
272 |
{ |
273 |
*d = *s; |
274 |
} |
275 |
#endif
|
276 |
|
277 |
static inline void target_siginitset(target_sigset_t *d, target_ulong set) |
278 |
{ |
279 |
int i;
|
280 |
d->sig[0] = set;
|
281 |
for(i = 1;i < TARGET_NSIG_WORDS; i++) |
282 |
d->sig[i] = 0;
|
283 |
} |
284 |
|
285 |
void host_to_target_sigset(target_sigset_t *d, const sigset_t *s); |
286 |
void target_to_host_sigset(sigset_t *d, const target_sigset_t *s); |
287 |
void host_to_target_old_sigset(target_ulong *old_sigset,
|
288 |
const sigset_t *sigset);
|
289 |
void target_to_host_old_sigset(sigset_t *sigset,
|
290 |
const target_ulong *old_sigset);
|
291 |
struct target_sigaction;
|
292 |
int do_sigaction(int sig, const struct target_sigaction *act, |
293 |
struct target_sigaction *oact);
|
294 |
|
295 |
#if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC) || defined(TARGET_PPC)
|
296 |
|
297 |
#if !defined(TARGET_SPARC)
|
298 |
#define TARGET_SA_NOCLDSTOP 0x00000001 |
299 |
#define TARGET_SA_NOCLDWAIT 0x00000002 /* not supported yet */ |
300 |
#define TARGET_SA_SIGINFO 0x00000004 |
301 |
#define TARGET_SA_ONSTACK 0x08000000 |
302 |
#define TARGET_SA_RESTART 0x10000000 |
303 |
#define TARGET_SA_NODEFER 0x40000000 |
304 |
#define TARGET_SA_RESETHAND 0x80000000 |
305 |
#define TARGET_SA_RESTORER 0x04000000 |
306 |
#else /* TARGET_SPARC */ |
307 |
#define TARGET_SA_NOCLDSTOP 8u |
308 |
#define TARGET_SA_NOCLDWAIT 0x100u |
309 |
#define TARGET_SA_SIGINFO 0x200u |
310 |
#define TARGET_SA_ONSTACK 1u |
311 |
#define TARGET_SA_RESTART 2u |
312 |
#define TARGET_SA_NODEFER 0x20u |
313 |
#define TARGET_SA_RESETHAND 4u |
314 |
#endif
|
315 |
|
316 |
#if defined(TARGET_SPARC)
|
317 |
|
318 |
#define TARGET_SIGHUP 1 |
319 |
#define TARGET_SIGINT 2 |
320 |
#define TARGET_SIGQUIT 3 |
321 |
#define TARGET_SIGILL 4 |
322 |
#define TARGET_SIGTRAP 5 |
323 |
#define TARGET_SIGABRT 6 |
324 |
#define TARGET_SIGIOT 6 |
325 |
#define TARGET_SIGSTKFLT 7 /* actually EMT */ |
326 |
#define TARGET_SIGFPE 8 |
327 |
#define TARGET_SIGKILL 9 |
328 |
#define TARGET_SIGBUS 10 |
329 |
#define TARGET_SIGSEGV 11 |
330 |
#define TARGET_SIGSYS 12 |
331 |
#define TARGET_SIGPIPE 13 |
332 |
#define TARGET_SIGALRM 14 |
333 |
#define TARGET_SIGTERM 15 |
334 |
#define TARGET_SIGURG 16 |
335 |
#define TARGET_SIGSTOP 17 |
336 |
#define TARGET_SIGTSTP 18 |
337 |
#define TARGET_SIGCONT 19 |
338 |
#define TARGET_SIGCHLD 20 |
339 |
#define TARGET_SIGTTIN 21 |
340 |
#define TARGET_SIGTTOU 22 |
341 |
#define TARGET_SIGIO 23 |
342 |
#define TARGET_SIGXCPU 24 |
343 |
#define TARGET_SIGXFSZ 25 |
344 |
#define TARGET_SIGVTALRM 26 |
345 |
#define TARGET_SIGPROF 27 |
346 |
#define TARGET_SIGWINCH 28 |
347 |
#define TARGET_SIGPWR 29 |
348 |
#define TARGET_SIGUSR1 30 |
349 |
#define TARGET_SIGUSR2 31 |
350 |
#define TARGET_SIGRTMIN 32 |
351 |
|
352 |
#define TARGET_SIG_BLOCK 0x01 /* for blocking signals */ |
353 |
#define TARGET_SIG_UNBLOCK 0x02 /* for unblocking signals */ |
354 |
#define TARGET_SIG_SETMASK 0x04 /* for setting the signal mask */ |
355 |
|
356 |
#else
|
357 |
|
358 |
#define TARGET_SIGHUP 1 |
359 |
#define TARGET_SIGINT 2 |
360 |
#define TARGET_SIGQUIT 3 |
361 |
#define TARGET_SIGILL 4 |
362 |
#define TARGET_SIGTRAP 5 |
363 |
#define TARGET_SIGABRT 6 |
364 |
#define TARGET_SIGIOT 6 |
365 |
#define TARGET_SIGBUS 7 |
366 |
#define TARGET_SIGFPE 8 |
367 |
#define TARGET_SIGKILL 9 |
368 |
#define TARGET_SIGUSR1 10 |
369 |
#define TARGET_SIGSEGV 11 |
370 |
#define TARGET_SIGUSR2 12 |
371 |
#define TARGET_SIGPIPE 13 |
372 |
#define TARGET_SIGALRM 14 |
373 |
#define TARGET_SIGTERM 15 |
374 |
#define TARGET_SIGSTKFLT 16 |
375 |
#define TARGET_SIGCHLD 17 |
376 |
#define TARGET_SIGCONT 18 |
377 |
#define TARGET_SIGSTOP 19 |
378 |
#define TARGET_SIGTSTP 20 |
379 |
#define TARGET_SIGTTIN 21 |
380 |
#define TARGET_SIGTTOU 22 |
381 |
#define TARGET_SIGURG 23 |
382 |
#define TARGET_SIGXCPU 24 |
383 |
#define TARGET_SIGXFSZ 25 |
384 |
#define TARGET_SIGVTALRM 26 |
385 |
#define TARGET_SIGPROF 27 |
386 |
#define TARGET_SIGWINCH 28 |
387 |
#define TARGET_SIGIO 29 |
388 |
#define TARGET_SIGPWR 30 |
389 |
#define TARGET_SIGSYS 31 |
390 |
#define TARGET_SIGRTMIN 32 |
391 |
|
392 |
#define TARGET_SIG_BLOCK 0 /* for blocking signals */ |
393 |
#define TARGET_SIG_UNBLOCK 1 /* for unblocking signals */ |
394 |
#define TARGET_SIG_SETMASK 2 /* for setting the signal mask */ |
395 |
|
396 |
#endif
|
397 |
|
398 |
struct target_old_sigaction {
|
399 |
target_ulong _sa_handler; |
400 |
target_ulong sa_mask; |
401 |
target_ulong sa_flags; |
402 |
target_ulong sa_restorer; |
403 |
}; |
404 |
|
405 |
struct target_sigaction {
|
406 |
target_ulong _sa_handler; |
407 |
target_ulong sa_flags; |
408 |
target_ulong sa_restorer; |
409 |
target_sigset_t sa_mask; |
410 |
}; |
411 |
|
412 |
typedef union target_sigval { |
413 |
int sival_int;
|
414 |
target_ulong sival_ptr; |
415 |
} target_sigval_t; |
416 |
#if 0
|
417 |
#if defined (TARGET_SPARC)
|
418 |
typedef struct {
|
419 |
struct {
|
420 |
target_ulong psr;
|
421 |
target_ulong pc;
|
422 |
target_ulong npc;
|
423 |
target_ulong y;
|
424 |
target_ulong u_regs[16]; /* globals and ins */
|
425 |
} si_regs;
|
426 |
int si_mask;
|
427 |
} __siginfo_t;
|
428 |
|
429 |
typedef struct {
|
430 |
unsigned long si_float_regs [32];
|
431 |
unsigned long si_fsr;
|
432 |
unsigned long si_fpqdepth;
|
433 |
struct {
|
434 |
unsigned long *insn_addr;
|
435 |
unsigned long insn;
|
436 |
} si_fpqueue [16];
|
437 |
} __siginfo_fpu_t;
|
438 |
#endif
|
439 |
#endif
|
440 |
|
441 |
#define TARGET_SI_MAX_SIZE 128 |
442 |
#define TARGET_SI_PAD_SIZE ((TARGET_SI_MAX_SIZE/sizeof(int)) - 3) |
443 |
|
444 |
typedef struct target_siginfo { |
445 |
int si_signo;
|
446 |
int si_errno;
|
447 |
int si_code;
|
448 |
|
449 |
union {
|
450 |
int _pad[TARGET_SI_PAD_SIZE];
|
451 |
|
452 |
/* kill() */
|
453 |
struct {
|
454 |
pid_t _pid; /* sender's pid */
|
455 |
uid_t _uid; /* sender's uid */
|
456 |
} _kill; |
457 |
|
458 |
/* POSIX.1b timers */
|
459 |
struct {
|
460 |
unsigned int _timer1; |
461 |
unsigned int _timer2; |
462 |
} _timer; |
463 |
|
464 |
/* POSIX.1b signals */
|
465 |
struct {
|
466 |
pid_t _pid; /* sender's pid */
|
467 |
uid_t _uid; /* sender's uid */
|
468 |
target_sigval_t _sigval; |
469 |
} _rt; |
470 |
|
471 |
/* SIGCHLD */
|
472 |
struct {
|
473 |
pid_t _pid; /* which child */
|
474 |
uid_t _uid; /* sender's uid */
|
475 |
int _status; /* exit code */ |
476 |
target_clock_t _utime; |
477 |
target_clock_t _stime; |
478 |
} _sigchld; |
479 |
|
480 |
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
|
481 |
struct {
|
482 |
target_ulong _addr; /* faulting insn/memory ref. */
|
483 |
} _sigfault; |
484 |
|
485 |
/* SIGPOLL */
|
486 |
struct {
|
487 |
int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ |
488 |
int _fd;
|
489 |
} _sigpoll; |
490 |
} _sifields; |
491 |
} target_siginfo_t; |
492 |
|
493 |
/*
|
494 |
* si_code values
|
495 |
* Digital reserves positive values for kernel-generated signals.
|
496 |
*/
|
497 |
#define TARGET_SI_USER 0 /* sent by kill, sigsend, raise */ |
498 |
#define TARGET_SI_KERNEL 0x80 /* sent by the kernel from somewhere */ |
499 |
#define TARGET_SI_QUEUE -1 /* sent by sigqueue */ |
500 |
#define TARGET_SI_TIMER -2 /* sent by timer expiration */ |
501 |
#define TARGET_SI_MESGQ -3 /* sent by real time mesq state change */ |
502 |
#define TARGET_SI_ASYNCIO -4 /* sent by AIO completion */ |
503 |
#define TARGET_SI_SIGIO -5 /* sent by queued SIGIO */ |
504 |
|
505 |
/*
|
506 |
* SIGILL si_codes
|
507 |
*/
|
508 |
#define TARGET_ILL_ILLOPC (1) /* illegal opcode */ |
509 |
#define TARGET_ILL_ILLOPN (2) /* illegal operand */ |
510 |
#define TARGET_ILL_ILLADR (3) /* illegal addressing mode */ |
511 |
#define TARGET_ILL_ILLTRP (4) /* illegal trap */ |
512 |
#define TARGET_ILL_PRVOPC (5) /* privileged opcode */ |
513 |
#define TARGET_ILL_PRVREG (6) /* privileged register */ |
514 |
#define TARGET_ILL_COPROC (7) /* coprocessor error */ |
515 |
#define TARGET_ILL_BADSTK (8) /* internal stack error */ |
516 |
|
517 |
/*
|
518 |
* SIGFPE si_codes
|
519 |
*/
|
520 |
#define TARGET_FPE_INTDIV (1) /* integer divide by zero */ |
521 |
#define TARGET_FPE_INTOVF (2) /* integer overflow */ |
522 |
#define TARGET_FPE_FLTDIV (3) /* floating point divide by zero */ |
523 |
#define TARGET_FPE_FLTOVF (4) /* floating point overflow */ |
524 |
#define TARGET_FPE_FLTUND (5) /* floating point underflow */ |
525 |
#define TARGET_FPE_FLTRES (6) /* floating point inexact result */ |
526 |
#define TARGET_FPE_FLTINV (7) /* floating point invalid operation */ |
527 |
#define TARGET_FPE_FLTSUB (8) /* subscript out of range */ |
528 |
#define TARGET_NSIGFPE 8 |
529 |
|
530 |
/*
|
531 |
* SIGSEGV si_codes
|
532 |
*/
|
533 |
#define TARGET_SEGV_MAPERR (1) /* address not mapped to object */ |
534 |
#define TARGET_SEGV_ACCERR (2) /* invalid permissions for mapped object */ |
535 |
|
536 |
/*
|
537 |
* SIGBUS si_codes
|
538 |
*/
|
539 |
#define TARGET_BUS_ADRALN (1) /* invalid address alignment */ |
540 |
#define TARGET_BUS_ADRERR (2) /* non-existant physical address */ |
541 |
#define TARGET_BUS_OBJERR (3) /* object specific hardware error */ |
542 |
|
543 |
/*
|
544 |
* SIGTRAP si_codes
|
545 |
*/
|
546 |
#define TARGET_TRAP_BRKPT (1) /* process breakpoint */ |
547 |
#define TARGET_TRAP_TRACE (2) /* process trace trap */ |
548 |
|
549 |
#endif /* defined(TARGET_I386) || defined(TARGET_ARM) */ |
550 |
|
551 |
struct target_rlimit {
|
552 |
target_ulong rlim_cur; |
553 |
target_ulong rlim_max; |
554 |
}; |
555 |
|
556 |
struct target_pollfd {
|
557 |
int fd; /* file descriptor */ |
558 |
short events; /* requested events */ |
559 |
short revents; /* returned events */ |
560 |
}; |
561 |
|
562 |
/* virtual terminal ioctls */
|
563 |
#define TARGET_KIOCSOUND 0x4B2F /* start sound generation (0 for off) */ |
564 |
#define TARGET_KDMKTONE 0x4B30 /* generate tone */ |
565 |
#define TARGET_KDGKBTYPE 0x4b33 |
566 |
#define TARGET_KDGKBENT 0x4B46 /* gets one entry in translation table */ |
567 |
#define TARGET_KDGKBSENT 0x4B48 /* gets one function key string entry */ |
568 |
|
569 |
#define TARGET_SIOCATMARK 0x8905 |
570 |
|
571 |
/* Networking ioctls */
|
572 |
#define TARGET_SIOCADDRT 0x890B /* add routing table entry */ |
573 |
#define TARGET_SIOCDELRT 0x890C /* delete routing table entry */ |
574 |
#define TARGET_SIOCGIFNAME 0x8910 /* get iface name */ |
575 |
#define TARGET_SIOCSIFLINK 0x8911 /* set iface channel */ |
576 |
#define TARGET_SIOCGIFCONF 0x8912 /* get iface list */ |
577 |
#define TARGET_SIOCGIFFLAGS 0x8913 /* get flags */ |
578 |
#define TARGET_SIOCSIFFLAGS 0x8914 /* set flags */ |
579 |
#define TARGET_SIOCGIFADDR 0x8915 /* get PA address */ |
580 |
#define TARGET_SIOCSIFADDR 0x8916 /* set PA address */ |
581 |
#define TARGET_SIOCGIFDSTADDR 0x8917 /* get remote PA address */ |
582 |
#define TARGET_SIOCSIFDSTADDR 0x8918 /* set remote PA address */ |
583 |
#define TARGET_SIOCGIFBRDADDR 0x8919 /* get broadcast PA address */ |
584 |
#define TARGET_SIOCSIFBRDADDR 0x891a /* set broadcast PA address */ |
585 |
#define TARGET_SIOCGIFNETMASK 0x891b /* get network PA mask */ |
586 |
#define TARGET_SIOCSIFNETMASK 0x891c /* set network PA mask */ |
587 |
#define TARGET_SIOCGIFMETRIC 0x891d /* get metric */ |
588 |
#define TARGET_SIOCSIFMETRIC 0x891e /* set metric */ |
589 |
#define TARGET_SIOCGIFMEM 0x891f /* get memory address (BSD) */ |
590 |
#define TARGET_SIOCSIFMEM 0x8920 /* set memory address (BSD) */ |
591 |
#define TARGET_SIOCGIFMTU 0x8921 /* get MTU size */ |
592 |
#define TARGET_SIOCSIFMTU 0x8922 /* set MTU size */ |
593 |
#define TARGET_SIOCSIFHWADDR 0x8924 /* set hardware address (NI) */ |
594 |
#define TARGET_SIOCGIFENCAP 0x8925 /* get/set slip encapsulation */ |
595 |
#define TARGET_SIOCSIFENCAP 0x8926 |
596 |
#define TARGET_SIOCGIFHWADDR 0x8927 /* Get hardware address */ |
597 |
#define TARGET_SIOCGIFSLAVE 0x8929 /* Driver slaving support */ |
598 |
#define TARGET_SIOCSIFSLAVE 0x8930 |
599 |
#define TARGET_SIOCADDMULTI 0x8931 /* Multicast address lists */ |
600 |
#define TARGET_SIOCDELMULTI 0x8932 |
601 |
|
602 |
/* Bridging control calls */
|
603 |
#define TARGET_SIOCGIFBR 0x8940 /* Bridging support */ |
604 |
#define TARGET_SIOCSIFBR 0x8941 /* Set bridging options */ |
605 |
|
606 |
#define TARGET_SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */ |
607 |
#define TARGET_SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */ |
608 |
|
609 |
/* ARP cache control calls. */
|
610 |
#define TARGET_OLD_SIOCDARP 0x8950 /* old delete ARP table entry */ |
611 |
#define TARGET_OLD_SIOCGARP 0x8951 /* old get ARP table entry */ |
612 |
#define TARGET_OLD_SIOCSARP 0x8952 /* old set ARP table entry */ |
613 |
#define TARGET_SIOCDARP 0x8953 /* delete ARP table entry */ |
614 |
#define TARGET_SIOCGARP 0x8954 /* get ARP table entry */ |
615 |
#define TARGET_SIOCSARP 0x8955 /* set ARP table entry */ |
616 |
|
617 |
/* RARP cache control calls. */
|
618 |
#define TARGET_SIOCDRARP 0x8960 /* delete RARP table entry */ |
619 |
#define TARGET_SIOCGRARP 0x8961 /* get RARP table entry */ |
620 |
#define TARGET_SIOCSRARP 0x8962 /* set RARP table entry */ |
621 |
|
622 |
/* Driver configuration calls */
|
623 |
#define TARGET_SIOCGIFMAP 0x8970 /* Get device parameters */ |
624 |
#define TARGET_SIOCSIFMAP 0x8971 /* Set device parameters */ |
625 |
|
626 |
/* DLCI configuration calls */
|
627 |
#define TARGET_SIOCADDDLCI 0x8980 /* Create new DLCI device */ |
628 |
#define TARGET_SIOCDELDLCI 0x8981 /* Delete DLCI device */ |
629 |
|
630 |
|
631 |
/* From <linux/fs.h> */
|
632 |
|
633 |
#define TARGET_BLKROSET TARGET_IO(0x12,93) /* set device read-only (0 = read-write) */ |
634 |
#define TARGET_BLKROGET TARGET_IO(0x12,94) /* get read-only status (0 = read_write) */ |
635 |
#define TARGET_BLKRRPART TARGET_IO(0x12,95) /* re-read partition table */ |
636 |
#define TARGET_BLKGETSIZE TARGET_IO(0x12,96) /* return device size /512 (long *arg) */ |
637 |
#define TARGET_BLKFLSBUF TARGET_IO(0x12,97) /* flush buffer cache */ |
638 |
#define TARGET_BLKRASET TARGET_IO(0x12,98) /* Set read ahead for block device */ |
639 |
#define TARGET_BLKRAGET TARGET_IO(0x12,99) /* get current read ahead setting */ |
640 |
#define TARGET_BLKFRASET TARGET_IO(0x12,100)/* set filesystem (mm/filemap.c) read-ahead */ |
641 |
#define TARGET_BLKFRAGET TARGET_IO(0x12,101)/* get filesystem (mm/filemap.c) read-ahead */ |
642 |
#define TARGET_BLKSECTSET TARGET_IO(0x12,102)/* set max sectors per request (ll_rw_blk.c) */ |
643 |
#define TARGET_BLKSECTGET TARGET_IO(0x12,103)/* get max sectors per request (ll_rw_blk.c) */ |
644 |
#define TARGET_BLKSSZGET TARGET_IO(0x12,104)/* get block device sector size */ |
645 |
/* A jump here: 108-111 have been used for various private purposes. */
|
646 |
#define TARGET_BLKBSZGET TARGET_IOR(0x12,112,sizeof(int)) |
647 |
#define TARGET_BLKBSZSET TARGET_IOW(0x12,113,sizeof(int)) |
648 |
#define TARGET_BLKGETSIZE64 TARGET_IOR(0x12,114,sizeof(uint64_t)) /* return device size in bytes (u64 *arg) */ |
649 |
#define TARGET_FIBMAP TARGET_IO(0x00,1) /* bmap access */ |
650 |
#define TARGET_FIGETBSZ TARGET_IO(0x00,2) /* get the block size used for bmap */ |
651 |
|
652 |
/* cdrom commands */
|
653 |
#define TARGET_CDROMPAUSE 0x5301 /* Pause Audio Operation */ |
654 |
#define TARGET_CDROMRESUME 0x5302 /* Resume paused Audio Operation */ |
655 |
#define TARGET_CDROMPLAYMSF 0x5303 /* Play Audio MSF (struct cdrom_msf) */ |
656 |
#define TARGET_CDROMPLAYTRKIND 0x5304 /* Play Audio Track/index |
657 |
(struct cdrom_ti) */
|
658 |
#define TARGET_CDROMREADTOCHDR 0x5305 /* Read TOC header |
659 |
(struct cdrom_tochdr) */
|
660 |
#define TARGET_CDROMREADTOCENTRY 0x5306 /* Read TOC entry |
661 |
(struct cdrom_tocentry) */
|
662 |
#define TARGET_CDROMSTOP 0x5307 /* Stop the cdrom drive */ |
663 |
#define TARGET_CDROMSTART 0x5308 /* Start the cdrom drive */ |
664 |
#define TARGET_CDROMEJECT 0x5309 /* Ejects the cdrom media */ |
665 |
#define TARGET_CDROMVOLCTRL 0x530a /* Control output volume |
666 |
(struct cdrom_volctrl) */
|
667 |
#define TARGET_CDROMSUBCHNL 0x530b /* Read subchannel data |
668 |
(struct cdrom_subchnl) */
|
669 |
#define TARGET_CDROMREADMODE2 0x530c /* Read TARGET_CDROM mode 2 data (2336 Bytes) |
670 |
(struct cdrom_read) */
|
671 |
#define TARGET_CDROMREADMODE1 0x530d /* Read TARGET_CDROM mode 1 data (2048 Bytes) |
672 |
(struct cdrom_read) */
|
673 |
#define TARGET_CDROMREADAUDIO 0x530e /* (struct cdrom_read_audio) */ |
674 |
#define TARGET_CDROMEJECT_SW 0x530f /* enable(1)/disable(0) auto-ejecting */ |
675 |
#define TARGET_CDROMMULTISESSION 0x5310 /* Obtain the start-of-last-session |
676 |
address of multi session disks
|
677 |
(struct cdrom_multisession) */
|
678 |
#define TARGET_CDROM_GET_MCN 0x5311 /* Obtain the "Universal Product Code" |
679 |
if available (struct cdrom_mcn) */
|
680 |
#define TARGET_CDROM_GET_UPC TARGET_CDROM_GET_MCN /* This one is depricated, |
681 |
but here anyway for compatability */
|
682 |
#define TARGET_CDROMRESET 0x5312 /* hard-reset the drive */ |
683 |
#define TARGET_CDROMVOLREAD 0x5313 /* Get the drive's volume setting |
684 |
(struct cdrom_volctrl) */
|
685 |
#define TARGET_CDROMREADRAW 0x5314 /* read data in raw mode (2352 Bytes) |
686 |
(struct cdrom_read) */
|
687 |
/*
|
688 |
* These ioctls are used only used in aztcd.c and optcd.c
|
689 |
*/
|
690 |
#define TARGET_CDROMREADCOOKED 0x5315 /* read data in cooked mode */ |
691 |
#define TARGET_CDROMSEEK 0x5316 /* seek msf address */ |
692 |
|
693 |
/*
|
694 |
* This ioctl is only used by the scsi-cd driver.
|
695 |
It is for playing audio in logical block addressing mode.
|
696 |
*/
|
697 |
#define TARGET_CDROMPLAYBLK 0x5317 /* (struct cdrom_blk) */ |
698 |
|
699 |
/*
|
700 |
* These ioctls are only used in optcd.c
|
701 |
*/
|
702 |
#define TARGET_CDROMREADALL 0x5318 /* read all 2646 bytes */ |
703 |
|
704 |
/*
|
705 |
* These ioctls are (now) only in ide-cd.c for controlling
|
706 |
* drive spindown time. They should be implemented in the
|
707 |
* Uniform driver, via generic packet commands, GPCMD_MODE_SELECT_10,
|
708 |
* GPCMD_MODE_SENSE_10 and the GPMODE_POWER_PAGE...
|
709 |
* -Erik
|
710 |
*/
|
711 |
#define TARGET_CDROMGETSPINDOWN 0x531d |
712 |
#define TARGET_CDROMSETSPINDOWN 0x531e |
713 |
|
714 |
/*
|
715 |
* These ioctls are implemented through the uniform CD-ROM driver
|
716 |
* They _will_ be adopted by all CD-ROM drivers, when all the CD-ROM
|
717 |
* drivers are eventually ported to the uniform CD-ROM driver interface.
|
718 |
*/
|
719 |
#define TARGET_CDROMCLOSETRAY 0x5319 /* pendant of CDROMEJECT */ |
720 |
#define TARGET_CDROM_SET_OPTIONS 0x5320 /* Set behavior options */ |
721 |
#define TARGET_CDROM_CLEAR_OPTIONS 0x5321 /* Clear behavior options */ |
722 |
#define TARGET_CDROM_SELECT_SPEED 0x5322 /* Set the CD-ROM speed */ |
723 |
#define TARGET_CDROM_SELECT_DISC 0x5323 /* Select disc (for juke-boxes) */ |
724 |
#define TARGET_CDROM_MEDIA_CHANGED 0x5325 /* Check is media changed */ |
725 |
#define TARGET_CDROM_DRIVE_STATUS 0x5326 /* Get tray position, etc. */ |
726 |
#define TARGET_CDROM_DISC_STATUS 0x5327 /* Get disc type, etc. */ |
727 |
#define TARGET_CDROM_CHANGER_NSLOTS 0x5328 /* Get number of slots */ |
728 |
#define TARGET_CDROM_LOCKDOOR 0x5329 /* lock or unlock door */ |
729 |
#define TARGET_CDROM_DEBUG 0x5330 /* Turn debug messages on/off */ |
730 |
#define TARGET_CDROM_GET_CAPABILITY 0x5331 /* get capabilities */ |
731 |
|
732 |
/* Note that scsi/scsi_ioctl.h also uses 0x5382 - 0x5386.
|
733 |
* Future CDROM ioctls should be kept below 0x537F
|
734 |
*/
|
735 |
|
736 |
/* This ioctl is only used by sbpcd at the moment */
|
737 |
#define TARGET_CDROMAUDIOBUFSIZ 0x5382 /* set the audio buffer size */ |
738 |
/* conflict with SCSI_IOCTL_GET_IDLUN */
|
739 |
|
740 |
/* DVD-ROM Specific ioctls */
|
741 |
#define TARGET_DVD_READ_STRUCT 0x5390 /* Read structure */ |
742 |
#define TARGET_DVD_WRITE_STRUCT 0x5391 /* Write structure */ |
743 |
#define TARGET_DVD_AUTH 0x5392 /* Authentication */ |
744 |
|
745 |
#define TARGET_CDROM_SEND_PACKET 0x5393 /* send a packet to the drive */ |
746 |
#define TARGET_CDROM_NEXT_WRITABLE 0x5394 /* get next writable block */ |
747 |
#define TARGET_CDROM_LAST_WRITTEN 0x5395 /* get last block written on disc */ |
748 |
|
749 |
/* HD commands */
|
750 |
|
751 |
/* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x030n/0x031n */
|
752 |
#define TARGET_HDIO_GETGEO 0x0301 /* get device geometry */ |
753 |
#define TARGET_HDIO_GET_UNMASKINTR 0x0302 /* get current unmask setting */ |
754 |
#define TARGET_HDIO_GET_MULTCOUNT 0x0304 /* get current IDE blockmode setting */ |
755 |
#define TARGET_HDIO_GET_KEEPSETTINGS 0x0308 /* get keep-settings-on-reset flag */ |
756 |
#define TARGET_HDIO_GET_32BIT 0x0309 /* get current io_32bit setting */ |
757 |
#define TARGET_HDIO_GET_NOWERR 0x030a /* get ignore-write-error flag */ |
758 |
#define TARGET_HDIO_GET_DMA 0x030b /* get use-dma flag */ |
759 |
#define TARGET_HDIO_GET_IDENTITY 0x030d /* get IDE identification info */ |
760 |
#define TARGET_HDIO_DRIVE_CMD 0x031f /* execute a special drive command */ |
761 |
|
762 |
/* hd/ide ctl's that pass (arg) non-ptr values are numbered 0x032n/0x033n */
|
763 |
#define TARGET_HDIO_SET_MULTCOUNT 0x0321 /* change IDE blockmode */ |
764 |
#define TARGET_HDIO_SET_UNMASKINTR 0x0322 /* permit other irqs during I/O */ |
765 |
#define TARGET_HDIO_SET_KEEPSETTINGS 0x0323 /* keep ioctl settings on reset */ |
766 |
#define TARGET_HDIO_SET_32BIT 0x0324 /* change io_32bit flags */ |
767 |
#define TARGET_HDIO_SET_NOWERR 0x0325 /* change ignore-write-error flag */ |
768 |
#define TARGET_HDIO_SET_DMA 0x0326 /* change use-dma flag */ |
769 |
#define TARGET_HDIO_SET_PIO_MODE 0x0327 /* reconfig interface to new speed */ |
770 |
|
771 |
|
772 |
/* from asm/termbits.h */
|
773 |
|
774 |
#define TARGET_NCC 8 |
775 |
struct target_termio {
|
776 |
unsigned short c_iflag; /* input mode flags */ |
777 |
unsigned short c_oflag; /* output mode flags */ |
778 |
unsigned short c_cflag; /* control mode flags */ |
779 |
unsigned short c_lflag; /* local mode flags */ |
780 |
unsigned char c_line; /* line discipline */ |
781 |
unsigned char c_cc[TARGET_NCC]; /* control characters */ |
782 |
}; |
783 |
|
784 |
struct target_winsize {
|
785 |
unsigned short ws_row; |
786 |
unsigned short ws_col; |
787 |
unsigned short ws_xpixel; |
788 |
unsigned short ws_ypixel; |
789 |
}; |
790 |
|
791 |
#include "termbits.h" |
792 |
|
793 |
#define TARGET_MAP_SHARED 0x01 /* Share changes */ |
794 |
#define TARGET_MAP_PRIVATE 0x02 /* Changes are private */ |
795 |
#define TARGET_MAP_TYPE 0x0f /* Mask for type of mapping */ |
796 |
#define TARGET_MAP_FIXED 0x10 /* Interpret addr exactly */ |
797 |
#define TARGET_MAP_ANONYMOUS 0x20 /* don't use a file */ |
798 |
|
799 |
#define TARGET_MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
800 |
#define TARGET_MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
801 |
#define TARGET_MAP_EXECUTABLE 0x1000 /* mark it as an executable */ |
802 |
#define TARGET_MAP_LOCKED 0x2000 /* pages are locked */ |
803 |
#define TARGET_MAP_NORESERVE 0x4000 /* don't check for reservations */ |
804 |
|
805 |
#if defined(TARGET_I386) || defined(TARGET_ARM)
|
806 |
struct target_stat {
|
807 |
unsigned short st_dev; |
808 |
unsigned short __pad1; |
809 |
target_ulong st_ino; |
810 |
unsigned short st_mode; |
811 |
unsigned short st_nlink; |
812 |
unsigned short st_uid; |
813 |
unsigned short st_gid; |
814 |
unsigned short st_rdev; |
815 |
unsigned short __pad2; |
816 |
target_ulong st_size; |
817 |
target_ulong st_blksize; |
818 |
target_ulong st_blocks; |
819 |
target_ulong target_st_atime; |
820 |
target_ulong __unused1; |
821 |
target_ulong target_st_mtime; |
822 |
target_ulong __unused2; |
823 |
target_ulong target_st_ctime; |
824 |
target_ulong __unused3; |
825 |
target_ulong __unused4; |
826 |
target_ulong __unused5; |
827 |
}; |
828 |
|
829 |
/* This matches struct stat64 in glibc2.1, hence the absolutely
|
830 |
* insane amounts of padding around dev_t's.
|
831 |
*/
|
832 |
struct target_stat64 {
|
833 |
unsigned short st_dev; |
834 |
unsigned char __pad0[10]; |
835 |
|
836 |
#define TARGET_STAT64_HAS_BROKEN_ST_INO 1 |
837 |
target_ulong __st_ino; |
838 |
|
839 |
unsigned int st_mode; |
840 |
unsigned int st_nlink; |
841 |
|
842 |
target_ulong st_uid; |
843 |
target_ulong st_gid; |
844 |
|
845 |
unsigned short st_rdev; |
846 |
unsigned char __pad3[10]; |
847 |
|
848 |
long long st_size; |
849 |
target_ulong st_blksize; |
850 |
|
851 |
target_ulong st_blocks; /* Number 512-byte blocks allocated. */
|
852 |
target_ulong __pad4; /* future possible st_blocks high bits */
|
853 |
|
854 |
target_ulong target_st_atime; |
855 |
target_ulong __pad5; |
856 |
|
857 |
target_ulong target_st_mtime; |
858 |
target_ulong __pad6; |
859 |
|
860 |
target_ulong target_st_ctime; |
861 |
target_ulong __pad7; /* will be high 32 bits of ctime someday */
|
862 |
|
863 |
unsigned long long st_ino; |
864 |
} __attribute__((packed)); |
865 |
|
866 |
#elif defined(TARGET_SPARC)
|
867 |
|
868 |
struct target_stat {
|
869 |
unsigned short st_dev; |
870 |
target_ulong st_ino; |
871 |
unsigned short st_mode; |
872 |
short st_nlink;
|
873 |
unsigned short st_uid; |
874 |
unsigned short st_gid; |
875 |
unsigned short st_rdev; |
876 |
target_long st_size; |
877 |
target_long target_st_atime; |
878 |
target_ulong __unused1; |
879 |
target_long target_st_mtime; |
880 |
target_ulong __unused2; |
881 |
target_long target_st_ctime; |
882 |
target_ulong __unused3; |
883 |
target_long st_blksize; |
884 |
target_long st_blocks; |
885 |
target_ulong __unused4[2];
|
886 |
}; |
887 |
|
888 |
struct target_stat64 {
|
889 |
unsigned char __pad0[6]; |
890 |
unsigned short st_dev; |
891 |
|
892 |
uint64_t st_ino; |
893 |
|
894 |
unsigned int st_mode; |
895 |
unsigned int st_nlink; |
896 |
|
897 |
unsigned int st_uid; |
898 |
unsigned int st_gid; |
899 |
|
900 |
unsigned char __pad2[6]; |
901 |
unsigned short st_rdev; |
902 |
|
903 |
unsigned char __pad3[8]; |
904 |
|
905 |
int64_t st_size; |
906 |
unsigned int st_blksize; |
907 |
|
908 |
unsigned char __pad4[8]; |
909 |
unsigned int st_blocks; |
910 |
|
911 |
unsigned int target_st_atime; |
912 |
unsigned int __unused1; |
913 |
|
914 |
unsigned int target_st_mtime; |
915 |
unsigned int __unused2; |
916 |
|
917 |
unsigned int target_st_ctime; |
918 |
unsigned int __unused3; |
919 |
|
920 |
unsigned int __unused4; |
921 |
unsigned int __unused5; |
922 |
}; |
923 |
|
924 |
#elif defined(TARGET_PPC)
|
925 |
|
926 |
struct target_stat {
|
927 |
unsigned short st_dev; |
928 |
target_ulong st_ino; |
929 |
unsigned int st_mode; |
930 |
unsigned short st_nlink; |
931 |
unsigned int st_uid; |
932 |
unsigned int st_gid; |
933 |
unsigned short st_rdev; |
934 |
target_ulong st_size; |
935 |
target_ulong st_blksize; |
936 |
target_ulong st_blocks; |
937 |
target_ulong target_st_atime; |
938 |
target_ulong __unused1; |
939 |
target_ulong target_st_mtime; |
940 |
target_ulong __unused2; |
941 |
target_ulong target_st_ctime; |
942 |
target_ulong __unused3; |
943 |
target_ulong __unused4; |
944 |
target_ulong __unused5; |
945 |
}; |
946 |
|
947 |
struct target_stat64 {
|
948 |
unsigned long long st_dev; |
949 |
unsigned long long st_ino; |
950 |
unsigned int st_mode; |
951 |
unsigned int st_nlink; |
952 |
unsigned int st_uid; |
953 |
unsigned int st_gid; |
954 |
unsigned long long st_rdev; |
955 |
long long pad0; |
956 |
long long st_size; |
957 |
target_ulong st_blksize; |
958 |
target_ulong pad1; |
959 |
long long st_blocks; /* Number 512-byte blocks allocated. */ |
960 |
target_ulong target_st_atime; |
961 |
target_ulong target_st_atime_nsec; |
962 |
target_ulong target_st_mtime; |
963 |
target_ulong target_st_mtime_nsec; |
964 |
target_ulong target_st_ctime; |
965 |
target_ulong target_st_ctime_nsec; |
966 |
target_ulong __unused4; |
967 |
target_ulong __unused5; |
968 |
}; |
969 |
|
970 |
#endif /* defined(TARGET_PPC) */ |
971 |
|
972 |
#define TARGET_F_DUPFD 0 /* dup */ |
973 |
#define TARGET_F_GETFD 1 /* get close_on_exec */ |
974 |
#define TARGET_F_SETFD 2 /* set/clear close_on_exec */ |
975 |
#define TARGET_F_GETFL 3 /* get file->f_flags */ |
976 |
#define TARGET_F_SETFL 4 /* set file->f_flags */ |
977 |
|
978 |
#if defined(TARGET_ALPHA)
|
979 |
#define TARGET_F_GETLK 7 |
980 |
#define TARGET_F_SETLK 8 |
981 |
#define TARGET_F_SETLKW 9 |
982 |
#define TARGET_F_SETOWN 5 /* for sockets. */ |
983 |
#define TARGET_F_GETOWN 6 /* for sockets. */ |
984 |
#else
|
985 |
#define TARGET_F_GETLK 5 |
986 |
#define TARGET_F_SETLK 6 |
987 |
#define TARGET_F_SETLKW 7 |
988 |
#define TARGET_F_SETOWN 8 /* for sockets. */ |
989 |
#define TARGET_F_GETOWN 9 /* for sockets. */ |
990 |
#endif
|
991 |
|
992 |
#define TARGET_F_SETSIG 10 /* for sockets. */ |
993 |
#define TARGET_F_GETSIG 11 /* for sockets. */ |
994 |
|
995 |
#define TARGET_F_GETLK64 12 /* using 'struct flock64' */ |
996 |
#define TARGET_F_SETLK64 13 |
997 |
#define TARGET_F_SETLKW64 14 |
998 |
|
999 |
#if defined (TARGET_ARM)
|
1000 |
#define TARGET_O_ACCMODE 0003 |
1001 |
#define TARGET_O_RDONLY 00 |
1002 |
#define TARGET_O_WRONLY 01 |
1003 |
#define TARGET_O_RDWR 02 |
1004 |
#define TARGET_O_CREAT 0100 /* not fcntl */ |
1005 |
#define TARGET_O_EXCL 0200 /* not fcntl */ |
1006 |
#define TARGET_O_NOCTTY 0400 /* not fcntl */ |
1007 |
#define TARGET_O_TRUNC 01000 /* not fcntl */ |
1008 |
#define TARGET_O_APPEND 02000 |
1009 |
#define TARGET_O_NONBLOCK 04000 |
1010 |
#define TARGET_O_NDELAY O_NONBLOCK
|
1011 |
#define TARGET_O_SYNC 010000 |
1012 |
#define TARGET_FASYNC 020000 /* fcntl, for BSD compatibility */ |
1013 |
#define TARGET_O_DIRECTORY 040000 /* must be a directory */ |
1014 |
#define TARGET_O_NOFOLLOW 0100000 /* don't follow links */ |
1015 |
#define TARGET_O_DIRECT 0200000 /* direct disk access hint */ |
1016 |
#define TARGET_O_LARGEFILE 0400000 |
1017 |
#elif defined (TARGET_PPC)
|
1018 |
#define TARGET_O_ACCMODE 0003 |
1019 |
#define TARGET_O_RDONLY 00 |
1020 |
#define TARGET_O_WRONLY 01 |
1021 |
#define TARGET_O_RDWR 02 |
1022 |
#define TARGET_O_CREAT 0100 /* not fcntl */ |
1023 |
#define TARGET_O_EXCL 0200 /* not fcntl */ |
1024 |
#define TARGET_O_NOCTTY 0400 /* not fcntl */ |
1025 |
#define TARGET_O_TRUNC 01000 /* not fcntl */ |
1026 |
#define TARGET_O_APPEND 02000 |
1027 |
#define TARGET_O_NONBLOCK 04000 |
1028 |
#define TARGET_O_NDELAY O_NONBLOCK
|
1029 |
#define TARGET_O_SYNC 010000 |
1030 |
#define TARGET_FASYNC 020000 /* fcntl, for BSD compatibility */ |
1031 |
#define TARGET_O_DIRECTORY 040000 /* must be a directory */ |
1032 |
#define TARGET_O_NOFOLLOW 0100000 /* don't follow links */ |
1033 |
#define TARGET_O_LARGEFILE 0200000 |
1034 |
#define TARGET_O_DIRECT 0400000 /* direct disk access hint */ |
1035 |
#elif defined (TARGET_SPARC)
|
1036 |
#define TARGET_O_RDONLY 0x0000 |
1037 |
#define TARGET_O_WRONLY 0x0001 |
1038 |
#define TARGET_O_RDWR 0x0002 |
1039 |
#define TARGET_O_ACCMODE 0x0003 |
1040 |
#define TARGET_O_APPEND 0x0008 |
1041 |
#define TARGET_FASYNC 0x0040 /* fcntl, for BSD compatibility */ |
1042 |
#define TARGET_O_CREAT 0x0200 /* not fcntl */ |
1043 |
#define TARGET_O_TRUNC 0x0400 /* not fcntl */ |
1044 |
#define TARGET_O_EXCL 0x0800 /* not fcntl */ |
1045 |
#define TARGET_O_SYNC 0x2000 |
1046 |
#define TARGET_O_NONBLOCK 0x4000 |
1047 |
#define TARGET_O_NDELAY (0x0004 | O_NONBLOCK) |
1048 |
#define TARGET_O_NOCTTY 0x8000 /* not fcntl */ |
1049 |
#define TARGET_O_DIRECTORY 0x10000 /* must be a directory */ |
1050 |
#define TARGET_O_NOFOLLOW 0x20000 /* don't follow links */ |
1051 |
#define TARGET_O_LARGEFILE 0x40000 |
1052 |
#define TARGET_O_DIRECT 0x100000 /* direct disk access hint */ |
1053 |
#else
|
1054 |
#define TARGET_O_ACCMODE 0003 |
1055 |
#define TARGET_O_RDONLY 00 |
1056 |
#define TARGET_O_WRONLY 01 |
1057 |
#define TARGET_O_RDWR 02 |
1058 |
#define TARGET_O_CREAT 0100 /* not fcntl */ |
1059 |
#define TARGET_O_EXCL 0200 /* not fcntl */ |
1060 |
#define TARGET_O_NOCTTY 0400 /* not fcntl */ |
1061 |
#define TARGET_O_TRUNC 01000 /* not fcntl */ |
1062 |
#define TARGET_O_APPEND 02000 |
1063 |
#define TARGET_O_NONBLOCK 04000 |
1064 |
#define TARGET_O_NDELAY O_NONBLOCK
|
1065 |
#define TARGET_O_SYNC 010000 |
1066 |
#define TARGET_FASYNC 020000 /* fcntl, for BSD compatibility */ |
1067 |
#define TARGET_O_DIRECT 040000 /* direct disk access hint */ |
1068 |
#define TARGET_O_LARGEFILE 0100000 |
1069 |
#define TARGET_O_DIRECTORY 0200000 /* must be a directory */ |
1070 |
#define TARGET_O_NOFOLLOW 0400000 /* don't follow links */ |
1071 |
#endif
|
1072 |
|
1073 |
struct target_flock {
|
1074 |
short l_type;
|
1075 |
short l_whence;
|
1076 |
target_ulong l_start; |
1077 |
target_ulong l_len; |
1078 |
int l_pid;
|
1079 |
}; |
1080 |
|
1081 |
struct target_flock64 {
|
1082 |
short l_type;
|
1083 |
short l_whence;
|
1084 |
unsigned long long l_start; |
1085 |
unsigned long long l_len; |
1086 |
int l_pid;
|
1087 |
}; |
1088 |
|
1089 |
|
1090 |
/* soundcard defines */
|
1091 |
/* XXX: convert them all to arch indepedent entries */
|
1092 |
#define TARGET_SNDCTL_COPR_HALT TARGET_IOWR('C', 7, int); |
1093 |
#define TARGET_SNDCTL_COPR_LOAD 0xcfb04301 |
1094 |
#define TARGET_SNDCTL_COPR_RCODE 0xc0144303 |
1095 |
#define TARGET_SNDCTL_COPR_RCVMSG 0x8fa44309 |
1096 |
#define TARGET_SNDCTL_COPR_RDATA 0xc0144302 |
1097 |
#define TARGET_SNDCTL_COPR_RESET 0x00004300 |
1098 |
#define TARGET_SNDCTL_COPR_RUN 0xc0144306 |
1099 |
#define TARGET_SNDCTL_COPR_SENDMSG 0xcfa44308 |
1100 |
#define TARGET_SNDCTL_COPR_WCODE 0x40144305 |
1101 |
#define TARGET_SNDCTL_COPR_WDATA 0x40144304 |
1102 |
#define TARGET_SNDCTL_DSP_RESET TARGET_IO('P', 0) |
1103 |
#define TARGET_SNDCTL_DSP_SYNC TARGET_IO('P', 1) |
1104 |
#define TARGET_SNDCTL_DSP_SPEED TARGET_IOWR('P', 2, int) |
1105 |
#define TARGET_SNDCTL_DSP_STEREO TARGET_IOWR('P', 3, int) |
1106 |
#define TARGET_SNDCTL_DSP_GETBLKSIZE TARGET_IOWR('P', 4, int) |
1107 |
#define TARGET_SNDCTL_DSP_SETFMT TARGET_IOWR('P', 5, int) |
1108 |
#define TARGET_SNDCTL_DSP_CHANNELS TARGET_IOWR('P', 6, int) |
1109 |
#define TARGET_SOUND_PCM_WRITE_FILTER TARGET_IOWR('P', 7, int) |
1110 |
#define TARGET_SNDCTL_DSP_POST TARGET_IO('P', 8) |
1111 |
#define TARGET_SNDCTL_DSP_SUBDIVIDE TARGET_IOWR('P', 9, int) |
1112 |
#define TARGET_SNDCTL_DSP_SETFRAGMENT TARGET_IOWR('P',10, int) |
1113 |
#define TARGET_SNDCTL_DSP_GETFMTS TARGET_IOR('P', 11, int) |
1114 |
#define TARGET_SNDCTL_DSP_GETOSPACE TARGET_IORU('P',12) |
1115 |
#define TARGET_SNDCTL_DSP_GETISPACE TARGET_IORU('P',13) |
1116 |
#define TARGET_SNDCTL_DSP_GETCAPS TARGET_IOR('P', 15, int) |
1117 |
#define TARGET_SNDCTL_DSP_GETTRIGGER TARGET_IOR('P',16, int) |
1118 |
#define TARGET_SNDCTL_DSP_GETIPTR TARGET_IORU('P',17) |
1119 |
#define TARGET_SNDCTL_DSP_GETOPTR TARGET_IORU('P',18) |
1120 |
#define TARGET_SNDCTL_DSP_MAPINBUF 0x80085013 |
1121 |
#define TARGET_SNDCTL_DSP_MAPOUTBUF 0x80085014 |
1122 |
#define TARGET_SNDCTL_DSP_NONBLOCK 0x0000500e |
1123 |
#define TARGET_SNDCTL_DSP_SAMPLESIZE 0xc0045005 |
1124 |
#define TARGET_SNDCTL_DSP_SETDUPLEX 0x00005016 |
1125 |
#define TARGET_SNDCTL_DSP_SETSYNCRO 0x00005015 |
1126 |
#define TARGET_SNDCTL_DSP_SETTRIGGER 0x40045010 |
1127 |
#define TARGET_SNDCTL_FM_4OP_ENABLE 0x4004510f |
1128 |
#define TARGET_SNDCTL_FM_LOAD_INSTR 0x40285107 |
1129 |
#define TARGET_SNDCTL_MIDI_INFO 0xc074510c |
1130 |
#define TARGET_SNDCTL_MIDI_MPUCMD 0xc0216d02 |
1131 |
#define TARGET_SNDCTL_MIDI_MPUMODE 0xc0046d01 |
1132 |
#define TARGET_SNDCTL_MIDI_PRETIME 0xc0046d00 |
1133 |
#define TARGET_SNDCTL_PMGR_ACCESS 0xcfb85110 |
1134 |
#define TARGET_SNDCTL_PMGR_IFACE 0xcfb85001 |
1135 |
#define TARGET_SNDCTL_SEQ_CTRLRATE 0xc0045103 |
1136 |
#define TARGET_SNDCTL_SEQ_GETINCOUNT 0x80045105 |
1137 |
#define TARGET_SNDCTL_SEQ_GETOUTCOUNT 0x80045104 |
1138 |
#define TARGET_SNDCTL_SEQ_NRMIDIS 0x8004510b |
1139 |
#define TARGET_SNDCTL_SEQ_NRSYNTHS 0x8004510a |
1140 |
#define TARGET_SNDCTL_SEQ_OUTOFBAND 0x40085112 |
1141 |
#define TARGET_SNDCTL_SEQ_PANIC 0x00005111 |
1142 |
#define TARGET_SNDCTL_SEQ_PERCMODE 0x40045106 |
1143 |
#define TARGET_SNDCTL_SEQ_RESET 0x00005100 |
1144 |
#define TARGET_SNDCTL_SEQ_RESETSAMPLES 0x40045109 |
1145 |
#define TARGET_SNDCTL_SEQ_SYNC 0x00005101 |
1146 |
#define TARGET_SNDCTL_SEQ_TESTMIDI 0x40045108 |
1147 |
#define TARGET_SNDCTL_SEQ_THRESHOLD 0x4004510d |
1148 |
#define TARGET_SNDCTL_SEQ_TRESHOLD 0x4004510d |
1149 |
#define TARGET_SNDCTL_SYNTH_INFO 0xc08c5102 |
1150 |
#define TARGET_SNDCTL_SYNTH_MEMAVL 0xc004510e |
1151 |
#define TARGET_SNDCTL_TMR_CONTINUE 0x00005404 |
1152 |
#define TARGET_SNDCTL_TMR_METRONOME 0x40045407 |
1153 |
#define TARGET_SNDCTL_TMR_SELECT 0x40045408 |
1154 |
#define TARGET_SNDCTL_TMR_SOURCE 0xc0045406 |
1155 |
#define TARGET_SNDCTL_TMR_START 0x00005402 |
1156 |
#define TARGET_SNDCTL_TMR_STOP 0x00005403 |
1157 |
#define TARGET_SNDCTL_TMR_TEMPO 0xc0045405 |
1158 |
#define TARGET_SNDCTL_TMR_TIMEBASE 0xc0045401 |
1159 |
#define TARGET_SOUND_PCM_READ_RATE 0x80045002 |
1160 |
#define TARGET_SOUND_PCM_READ_CHANNELS 0x80045006 |
1161 |
#define TARGET_SOUND_PCM_READ_BITS 0x80045005 |
1162 |
#define TARGET_SOUND_PCM_READ_FILTER 0x80045007 |
1163 |
#define TARGET_SOUND_MIXER_INFO TARGET_IOR ('M', 101, mixer_info) |
1164 |
#define TARGET_SOUND_MIXER_ACCESS 0xc0804d66 |
1165 |
#define TARGET_SOUND_MIXER_PRIVATE1 TARGET_IOWR('M', 111, int) |
1166 |
#define TARGET_SOUND_MIXER_PRIVATE2 TARGET_IOWR('M', 112, int) |
1167 |
#define TARGET_SOUND_MIXER_PRIVATE3 TARGET_IOWR('M', 113, int) |
1168 |
#define TARGET_SOUND_MIXER_PRIVATE4 TARGET_IOWR('M', 114, int) |
1169 |
#define TARGET_SOUND_MIXER_PRIVATE5 TARGET_IOWR('M', 115, int) |
1170 |
|
1171 |
#define TARGET_MIXER_READ(dev) TARGET_IOR('M', dev, int) |
1172 |
|
1173 |
#define TARGET_SOUND_MIXER_READ_VOLUME TARGET_MIXER_READ(SOUND_MIXER_VOLUME)
|
1174 |
#define TARGET_SOUND_MIXER_READ_BASS TARGET_MIXER_READ(SOUND_MIXER_BASS)
|
1175 |
#define TARGET_SOUND_MIXER_READ_TREBLE TARGET_MIXER_READ(SOUND_MIXER_TREBLE)
|
1176 |
#define TARGET_SOUND_MIXER_READ_SYNTH TARGET_MIXER_READ(SOUND_MIXER_SYNTH)
|
1177 |
#define TARGET_SOUND_MIXER_READ_PCM TARGET_MIXER_READ(SOUND_MIXER_PCM)
|
1178 |
#define TARGET_SOUND_MIXER_READ_SPEAKER TARGET_MIXER_READ(SOUND_MIXER_SPEAKER)
|
1179 |
#define TARGET_SOUND_MIXER_READ_LINE TARGET_MIXER_READ(SOUND_MIXER_LINE)
|
1180 |
#define TARGET_SOUND_MIXER_READ_MIC TARGET_MIXER_READ(SOUND_MIXER_MIC)
|
1181 |
#define TARGET_SOUND_MIXER_READ_CD TARGET_MIXER_READ(SOUND_MIXER_CD)
|
1182 |
#define TARGET_SOUND_MIXER_READ_IMIX TARGET_MIXER_READ(SOUND_MIXER_IMIX)
|
1183 |
#define TARGET_SOUND_MIXER_READ_ALTPCM TARGET_MIXER_READ(SOUND_MIXER_ALTPCM)
|
1184 |
#define TARGET_SOUND_MIXER_READ_RECLEV TARGET_MIXER_READ(SOUND_MIXER_RECLEV)
|
1185 |
#define TARGET_SOUND_MIXER_READ_IGAIN TARGET_MIXER_READ(SOUND_MIXER_IGAIN)
|
1186 |
#define TARGET_SOUND_MIXER_READ_OGAIN TARGET_MIXER_READ(SOUND_MIXER_OGAIN)
|
1187 |
#define TARGET_SOUND_MIXER_READ_LINE1 TARGET_MIXER_READ(SOUND_MIXER_LINE1)
|
1188 |
#define TARGET_SOUND_MIXER_READ_LINE2 TARGET_MIXER_READ(SOUND_MIXER_LINE2)
|
1189 |
#define TARGET_SOUND_MIXER_READ_LINE3 TARGET_MIXER_READ(SOUND_MIXER_LINE3)
|
1190 |
|
1191 |
/* Obsolete macros */
|
1192 |
#define TARGET_SOUND_MIXER_READ_MUTE TARGET_MIXER_READ(SOUND_MIXER_MUTE)
|
1193 |
#define TARGET_SOUND_MIXER_READ_ENHANCE TARGET_MIXER_READ(SOUND_MIXER_ENHANCE)
|
1194 |
#define TARGET_SOUND_MIXER_READ_LOUD TARGET_MIXER_READ(SOUND_MIXER_LOUD)
|
1195 |
|
1196 |
#define TARGET_SOUND_MIXER_READ_RECSRC TARGET_MIXER_READ(SOUND_MIXER_RECSRC)
|
1197 |
#define TARGET_SOUND_MIXER_READ_DEVMASK TARGET_MIXER_READ(SOUND_MIXER_DEVMASK)
|
1198 |
#define TARGET_SOUND_MIXER_READ_RECMASK TARGET_MIXER_READ(SOUND_MIXER_RECMASK)
|
1199 |
#define TARGET_SOUND_MIXER_READ_STEREODEVS TARGET_MIXER_READ(SOUND_MIXER_STEREODEVS)
|
1200 |
#define TARGET_SOUND_MIXER_READ_CAPS TARGET_MIXER_READ(SOUND_MIXER_CAPS)
|
1201 |
|
1202 |
#define TARGET_MIXER_WRITE(dev) TARGET_IOWR('M', dev, int) |
1203 |
|
1204 |
#define TARGET_SOUND_MIXER_WRITE_VOLUME TARGET_MIXER_WRITE(SOUND_MIXER_VOLUME)
|
1205 |
#define TARGET_SOUND_MIXER_WRITE_BASS TARGET_MIXER_WRITE(SOUND_MIXER_BASS)
|
1206 |
#define TARGET_SOUND_MIXER_WRITE_TREBLE TARGET_MIXER_WRITE(SOUND_MIXER_TREBLE)
|
1207 |
#define TARGET_SOUND_MIXER_WRITE_SYNTH TARGET_MIXER_WRITE(SOUND_MIXER_SYNTH)
|
1208 |
#define TARGET_SOUND_MIXER_WRITE_PCM TARGET_MIXER_WRITE(SOUND_MIXER_PCM)
|
1209 |
#define TARGET_SOUND_MIXER_WRITE_SPEAKER TARGET_MIXER_WRITE(SOUND_MIXER_SPEAKER)
|
1210 |
#define TARGET_SOUND_MIXER_WRITE_LINE TARGET_MIXER_WRITE(SOUND_MIXER_LINE)
|
1211 |
#define TARGET_SOUND_MIXER_WRITE_MIC TARGET_MIXER_WRITE(SOUND_MIXER_MIC)
|
1212 |
#define TARGET_SOUND_MIXER_WRITE_CD TARGET_MIXER_WRITE(SOUND_MIXER_CD)
|
1213 |
#define TARGET_SOUND_MIXER_WRITE_IMIX TARGET_MIXER_WRITE(SOUND_MIXER_IMIX)
|
1214 |
#define TARGET_SOUND_MIXER_WRITE_ALTPCM TARGET_MIXER_WRITE(SOUND_MIXER_ALTPCM)
|
1215 |
#define TARGET_SOUND_MIXER_WRITE_RECLEV TARGET_MIXER_WRITE(SOUND_MIXER_RECLEV)
|
1216 |
#define TARGET_SOUND_MIXER_WRITE_IGAIN TARGET_MIXER_WRITE(SOUND_MIXER_IGAIN)
|
1217 |
#define TARGET_SOUND_MIXER_WRITE_OGAIN TARGET_MIXER_WRITE(SOUND_MIXER_OGAIN)
|
1218 |
#define TARGET_SOUND_MIXER_WRITE_LINE1 TARGET_MIXER_WRITE(SOUND_MIXER_LINE1)
|
1219 |
#define TARGET_SOUND_MIXER_WRITE_LINE2 TARGET_MIXER_WRITE(SOUND_MIXER_LINE2)
|
1220 |
#define TARGET_SOUND_MIXER_WRITE_LINE3 TARGET_MIXER_WRITE(SOUND_MIXER_LINE3)
|
1221 |
|
1222 |
/* Obsolete macros */
|
1223 |
#define TARGET_SOUND_MIXER_WRITE_MUTE TARGET_MIXER_WRITE(SOUND_MIXER_MUTE)
|
1224 |
#define TARGET_SOUND_MIXER_WRITE_ENHANCE TARGET_MIXER_WRITE(SOUND_MIXER_ENHANCE)
|
1225 |
#define TARGET_SOUND_MIXER_WRITE_LOUD TARGET_MIXER_WRITE(SOUND_MIXER_LOUD)
|
1226 |
|
1227 |
#define TARGET_SOUND_MIXER_WRITE_RECSRC TARGET_MIXER_WRITE(SOUND_MIXER_RECSRC)
|
1228 |
|
1229 |
/* vfat ioctls */
|
1230 |
#define TARGET_VFAT_IOCTL_READDIR_BOTH TARGET_IORU('r', 1) |
1231 |
#define TARGET_VFAT_IOCTL_READDIR_SHORT TARGET_IORU('r', 2) |
1232 |
|
1233 |
struct target_sysinfo {
|
1234 |
target_long uptime; /* Seconds since boot */
|
1235 |
target_ulong loads[3]; /* 1, 5, and 15 minute load averages */ |
1236 |
target_ulong totalram; /* Total usable main memory size */
|
1237 |
target_ulong freeram; /* Available memory size */
|
1238 |
target_ulong sharedram; /* Amount of shared memory */
|
1239 |
target_ulong bufferram; /* Memory used by buffers */
|
1240 |
target_ulong totalswap; /* Total swap space size */
|
1241 |
target_ulong freeswap; /* swap space still available */
|
1242 |
unsigned short procs; /* Number of current processes */ |
1243 |
unsigned short pad; /* explicit padding for m68k */ |
1244 |
target_ulong totalhigh; /* Total high memory size */
|
1245 |
target_ulong freehigh; /* Available high memory size */
|
1246 |
unsigned int mem_unit; /* Memory unit size in bytes */ |
1247 |
char _f[20-2*sizeof(target_long)-sizeof(int)]; /* Padding: libc5 uses this.. */ |
1248 |
}; |