syscall_defs.h (edafea13) syscall_defs.h (d962783e)
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 putting ifdefs if
5 necessary */
6
7#include "syscall_nr.h"
8

--- 45 unchanged lines hidden (view full) ---

54#define USE_UID16
55#define target_id uint16_t
56#else
57#define target_id uint32_t
58#endif
59
60#if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SH4) \
61 || defined(TARGET_M68K) || defined(TARGET_CRIS) || defined(TARGET_UNICORE32) \
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 putting ifdefs if
5 necessary */
6
7#include "syscall_nr.h"
8

--- 45 unchanged lines hidden (view full) ---

54#define USE_UID16
55#define target_id uint16_t
56#else
57#define target_id uint32_t
58#endif
59
60#if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SH4) \
61 || defined(TARGET_M68K) || defined(TARGET_CRIS) || defined(TARGET_UNICORE32) \
62 || defined(TARGET_S390X)
62 || defined(TARGET_S390X) || defined(TARGET_OPENRISC)
63
64#define TARGET_IOC_SIZEBITS 14
65#define TARGET_IOC_DIRBITS 2
66
67#define TARGET_IOC_NONE 0U
68#define TARGET_IOC_WRITE 1U
69#define TARGET_IOC_READ 2U
70

--- 247 unchanged lines hidden (view full) ---

318struct target_sigaction;
319int do_sigaction(int sig, const struct target_sigaction *act,
320 struct target_sigaction *oact);
321
322#if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC) \
323 || defined(TARGET_PPC) || defined(TARGET_MIPS) || defined(TARGET_SH4) \
324 || defined(TARGET_M68K) || defined(TARGET_ALPHA) || defined(TARGET_CRIS) \
325 || defined(TARGET_MICROBLAZE) || defined(TARGET_UNICORE32) \
63
64#define TARGET_IOC_SIZEBITS 14
65#define TARGET_IOC_DIRBITS 2
66
67#define TARGET_IOC_NONE 0U
68#define TARGET_IOC_WRITE 1U
69#define TARGET_IOC_READ 2U
70

--- 247 unchanged lines hidden (view full) ---

318struct target_sigaction;
319int do_sigaction(int sig, const struct target_sigaction *act,
320 struct target_sigaction *oact);
321
322#if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC) \
323 || defined(TARGET_PPC) || defined(TARGET_MIPS) || defined(TARGET_SH4) \
324 || defined(TARGET_M68K) || defined(TARGET_ALPHA) || defined(TARGET_CRIS) \
325 || defined(TARGET_MICROBLAZE) || defined(TARGET_UNICORE32) \
326 || defined(TARGET_S390X)
326 || defined(TARGET_S390X) || defined(TARGET_OPENRISC)
327
328#if defined(TARGET_SPARC)
329#define TARGET_SA_NOCLDSTOP 8u
330#define TARGET_SA_NOCLDWAIT 0x100u
331#define TARGET_SA_SIGINFO 0x200u
332#define TARGET_SA_ONSTACK 1u
333#define TARGET_SA_RESTART 2u
334#define TARGET_SA_NODEFER 0x20u

--- 4 unchanged lines hidden (view full) ---

339#define TARGET_SA_SIGINFO 0x00000008
340#define TARGET_SA_ONSTACK 0x08000000
341#define TARGET_SA_NODEFER 0x40000000
342#define TARGET_SA_RESTART 0x10000000
343#define TARGET_SA_RESETHAND 0x80000000
344#if !defined(TARGET_ABI_MIPSN32) && !defined(TARGET_ABI_MIPSN64)
345#define TARGET_SA_RESTORER 0x04000000 /* Only for O32 */
346#endif
327
328#if defined(TARGET_SPARC)
329#define TARGET_SA_NOCLDSTOP 8u
330#define TARGET_SA_NOCLDWAIT 0x100u
331#define TARGET_SA_SIGINFO 0x200u
332#define TARGET_SA_ONSTACK 1u
333#define TARGET_SA_RESTART 2u
334#define TARGET_SA_NODEFER 0x20u

--- 4 unchanged lines hidden (view full) ---

339#define TARGET_SA_SIGINFO 0x00000008
340#define TARGET_SA_ONSTACK 0x08000000
341#define TARGET_SA_NODEFER 0x40000000
342#define TARGET_SA_RESTART 0x10000000
343#define TARGET_SA_RESETHAND 0x80000000
344#if !defined(TARGET_ABI_MIPSN32) && !defined(TARGET_ABI_MIPSN64)
345#define TARGET_SA_RESTORER 0x04000000 /* Only for O32 */
346#endif
347#elif defined(TARGET_OPENRISC)
348#define TARGET_SA_NOCLDSTOP 0x00000001
349#define TARGET_SA_NOCLDWAIT 0x00000002
350#define TARGET_SA_SIGINFO 0x00000004
351#define TARGET_SA_ONSTACK 0x08000000
352#define TARGET_SA_RESTART 0x10000000
353#define TARGET_SA_NODEFER 0x40000000
354#define TARGET_SA_RESETHAND 0x80000000
347#elif defined(TARGET_ALPHA)
348#define TARGET_SA_ONSTACK 0x00000001
349#define TARGET_SA_RESTART 0x00000002
350#define TARGET_SA_NOCLDSTOP 0x00000004
351#define TARGET_SA_NODEFER 0x00000008
352#define TARGET_SA_RESETHAND 0x00000010
353#define TARGET_SA_NOCLDWAIT 0x00000020 /* not supported yet */
354#define TARGET_SA_SIGINFO 0x00000040

--- 88 unchanged lines hidden (view full) ---

443#define TARGET_SIGRTMIN 32
444
445#define TARGET_SIG_BLOCK 1 /* for blocking signals */
446#define TARGET_SIG_UNBLOCK 2 /* for unblocking signals */
447#define TARGET_SIG_SETMASK 3 /* for setting the signal mask */
448
449#else
450
355#elif defined(TARGET_ALPHA)
356#define TARGET_SA_ONSTACK 0x00000001
357#define TARGET_SA_RESTART 0x00000002
358#define TARGET_SA_NOCLDSTOP 0x00000004
359#define TARGET_SA_NODEFER 0x00000008
360#define TARGET_SA_RESETHAND 0x00000010
361#define TARGET_SA_NOCLDWAIT 0x00000020 /* not supported yet */
362#define TARGET_SA_SIGINFO 0x00000040

--- 88 unchanged lines hidden (view full) ---

451#define TARGET_SIGRTMIN 32
452
453#define TARGET_SIG_BLOCK 1 /* for blocking signals */
454#define TARGET_SIG_UNBLOCK 2 /* for unblocking signals */
455#define TARGET_SIG_SETMASK 3 /* for setting the signal mask */
456
457#else
458
459/* OpenRISC Using the general signals */
451#define TARGET_SIGHUP 1
452#define TARGET_SIGINT 2
453#define TARGET_SIGQUIT 3
454#define TARGET_SIGILL 4
455#define TARGET_SIGTRAP 5
456#define TARGET_SIGABRT 6
457#define TARGET_SIGIOT 6
458#define TARGET_SIGBUS 7

--- 622 unchanged lines hidden (view full) ---

1081#define TARGET_MAP_LOCKED 0x2000 /* pages are locked */
1082#define TARGET_MAP_NORESERVE 0x4000 /* don't check for reservations */
1083#define TARGET_MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
1084#define TARGET_MAP_NONBLOCK 0x10000 /* do not block on IO */
1085#define TARGET_MAP_UNINITIALIZED 0x4000000 /* for anonymous mmap, memory could be uninitialized */
1086#endif
1087
1088#if (defined(TARGET_I386) && defined(TARGET_ABI32)) || defined(TARGET_ARM) \
460#define TARGET_SIGHUP 1
461#define TARGET_SIGINT 2
462#define TARGET_SIGQUIT 3
463#define TARGET_SIGILL 4
464#define TARGET_SIGTRAP 5
465#define TARGET_SIGABRT 6
466#define TARGET_SIGIOT 6
467#define TARGET_SIGBUS 7

--- 622 unchanged lines hidden (view full) ---

1090#define TARGET_MAP_LOCKED 0x2000 /* pages are locked */
1091#define TARGET_MAP_NORESERVE 0x4000 /* don't check for reservations */
1092#define TARGET_MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
1093#define TARGET_MAP_NONBLOCK 0x10000 /* do not block on IO */
1094#define TARGET_MAP_UNINITIALIZED 0x4000000 /* for anonymous mmap, memory could be uninitialized */
1095#endif
1096
1097#if (defined(TARGET_I386) && defined(TARGET_ABI32)) || defined(TARGET_ARM) \
1089 || defined(TARGET_CRIS) || defined(TARGET_UNICORE32)
1098 || defined(TARGET_CRIS) || defined(TARGET_UNICORE32) \
1099 || defined(TARGET_OPENRISC)
1090struct target_stat {
1091 unsigned short st_dev;
1092 unsigned short __pad1;
1093 abi_ulong st_ino;
1094 unsigned short st_mode;
1095 unsigned short st_nlink;
1096 unsigned short st_uid;
1097 unsigned short st_gid;

--- 680 unchanged lines hidden (view full) ---

1778 abi_ulong target_st_mtime;
1779 abi_ulong target_st_mtime_nsec;
1780 abi_ulong target_st_ctime;
1781 abi_ulong target_st_ctime_nsec;
1782 abi_ulong st_blksize;
1783 abi_long st_blocks;
1784 abi_ulong __unused[3];
1785};
1100struct target_stat {
1101 unsigned short st_dev;
1102 unsigned short __pad1;
1103 abi_ulong st_ino;
1104 unsigned short st_mode;
1105 unsigned short st_nlink;
1106 unsigned short st_uid;
1107 unsigned short st_gid;

--- 680 unchanged lines hidden (view full) ---

1788 abi_ulong target_st_mtime;
1789 abi_ulong target_st_mtime_nsec;
1790 abi_ulong target_st_ctime;
1791 abi_ulong target_st_ctime_nsec;
1792 abi_ulong st_blksize;
1793 abi_long st_blocks;
1794 abi_ulong __unused[3];
1795};
1796#elif defined(TARGET_OPENRISC)
1797struct target_stat {
1798 abi_ulong st_dev;
1799 abi_ulong st_ino;
1800 abi_ulong st_nlink;
1801
1802 unsigned int st_mode;
1803 unsigned int st_uid;
1804 unsigned int st_gid;
1805 unsigned int __pad0;
1806 abi_ulong st_rdev;
1807 abi_long st_size;
1808 abi_long st_blksize;
1809 abi_long st_blocks; /* Number 512-byte blocks allocated. */
1810
1811 abi_ulong target_st_atime;
1812 abi_ulong target_st_atime_nsec;
1813 abi_ulong target_st_mtime;
1814 abi_ulong target_st_mtime_nsec;
1815 abi_ulong target_st_ctime;
1816 abi_ulong target_st_ctime_nsec;
1817
1818 abi_long __unused[3];
1819};
1786#else
1787#error unsupported CPU
1788#endif
1789
1790typedef struct {
1791 int val[2];
1792} target_fsid_t;
1793

--- 571 unchanged lines hidden ---
1820#else
1821#error unsupported CPU
1822#endif
1823
1824typedef struct {
1825 int val[2];
1826} target_fsid_t;
1827

--- 571 unchanged lines hidden ---