1 //! AArch64-specific definitions for 64-bit linux-like values 2 3 pub type c_char = u8; 4 pub type wchar_t = u32; 5 pub type nlink_t = u32; 6 pub type blksize_t = i32; 7 8 s! { 9 pub struct stat { 10 pub st_dev: ::dev_t, 11 pub st_ino: ::ino_t, 12 pub st_mode: ::mode_t, 13 pub st_nlink: ::nlink_t, 14 pub st_uid: ::uid_t, 15 pub st_gid: ::gid_t, 16 pub st_rdev: ::dev_t, 17 __pad1: ::dev_t, 18 pub st_size: ::off_t, 19 pub st_blksize: ::blksize_t, 20 __pad2: ::c_int, 21 pub st_blocks: ::blkcnt_t, 22 pub st_atime: ::time_t, 23 pub st_atime_nsec: ::c_long, 24 pub st_mtime: ::time_t, 25 pub st_mtime_nsec: ::c_long, 26 pub st_ctime: ::time_t, 27 pub st_ctime_nsec: ::c_long, 28 __unused: [::c_int; 2], 29 } 30 31 pub struct stat64 { 32 pub st_dev: ::dev_t, 33 pub st_ino: ::ino_t, 34 pub st_mode: ::mode_t, 35 pub st_nlink: ::nlink_t, 36 pub st_uid: ::uid_t, 37 pub st_gid: ::gid_t, 38 pub st_rdev: ::dev_t, 39 __pad1: ::dev_t, 40 pub st_size: ::off64_t, 41 pub st_blksize: ::blksize_t, 42 __pad2: ::c_int, 43 pub st_blocks: ::blkcnt64_t, 44 pub st_atime: ::time_t, 45 pub st_atime_nsec: ::c_long, 46 pub st_mtime: ::time_t, 47 pub st_mtime_nsec: ::c_long, 48 pub st_ctime: ::time_t, 49 pub st_ctime_nsec: ::c_long, 50 __unused: [::c_int; 2], 51 } 52 53 pub struct pthread_attr_t { 54 __size: [u64; 8] 55 } 56 57 pub struct ipc_perm { 58 pub __key: ::key_t, 59 pub uid: ::uid_t, 60 pub gid: ::gid_t, 61 pub cuid: ::uid_t, 62 pub cgid: ::gid_t, 63 pub mode: ::c_ushort, 64 __pad1: ::c_ushort, 65 pub __seq: ::c_ushort, 66 __pad2: ::c_ushort, 67 __unused1: ::c_ulong, 68 __unused2: ::c_ulong 69 } 70 71 pub struct shmid_ds { 72 pub shm_perm: ::ipc_perm, 73 pub shm_segsz: ::size_t, 74 pub shm_atime: ::time_t, 75 pub shm_dtime: ::time_t, 76 pub shm_ctime: ::time_t, 77 pub shm_cpid: ::pid_t, 78 pub shm_lpid: ::pid_t, 79 pub shm_nattch: ::shmatt_t, 80 __unused4: ::c_ulong, 81 __unused5: ::c_ulong 82 } 83 } 84 85 pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 8; 86 pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 48; 87 pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 8; 88 89 pub const O_DIRECT: ::c_int = 0x10000; 90 pub const O_DIRECTORY: ::c_int = 0x4000; 91 pub const O_NOFOLLOW: ::c_int = 0x8000; 92 93 pub const MAP_LOCKED: ::c_int = 0x02000; 94 pub const MAP_NORESERVE: ::c_int = 0x04000; 95 96 pub const EDEADLOCK: ::c_int = 35; 97 98 pub const SO_PEERCRED: ::c_int = 17; 99 pub const SO_RCVLOWAT: ::c_int = 18; 100 pub const SO_SNDLOWAT: ::c_int = 19; 101 pub const SO_RCVTIMEO: ::c_int = 20; 102 pub const SO_SNDTIMEO: ::c_int = 21; 103 104 pub const FIOCLEX: ::c_ulong = 0x5451; 105 pub const FIONBIO: ::c_ulong = 0x5421; 106 107 pub const SYS_gettid: ::c_long = 178; 108 pub const SYS_perf_event_open: ::c_long = 241; 109 110 pub const MCL_CURRENT: ::c_int = 0x0001; 111 pub const MCL_FUTURE: ::c_int = 0x0002; 112 113 pub const SIGSTKSZ: ::size_t = 8192; 114 pub const CBAUD: ::tcflag_t = 0o0010017; 115 pub const TAB1: ::c_int = 0x00000800; 116 pub const TAB2: ::c_int = 0x00001000; 117 pub const TAB3: ::c_int = 0x00001800; 118 pub const CR1: ::c_int = 0x00000200; 119 pub const CR2: ::c_int = 0x00000400; 120 pub const CR3: ::c_int = 0x00000600; 121 pub const FF1: ::c_int = 0x00008000; 122 pub const BS1: ::c_int = 0x00002000; 123 pub const VT1: ::c_int = 0x00004000; 124 pub const VWERASE: usize = 14; 125 pub const VREPRINT: usize = 12; 126 pub const VSUSP: usize = 10; 127 pub const VSTART: usize = 8; 128 pub const VSTOP: usize = 9; 129 pub const VDISCARD: usize = 13; 130 pub const VTIME: usize = 5; 131 pub const IXON: ::tcflag_t = 0x00000400; 132 pub const IXOFF: ::tcflag_t = 0x00001000; 133 pub const ONLCR: ::tcflag_t = 0x4; 134 pub const CSIZE: ::tcflag_t = 0x00000030; 135 pub const CS6: ::tcflag_t = 0x00000010; 136 pub const CS7: ::tcflag_t = 0x00000020; 137 pub const CS8: ::tcflag_t = 0x00000030; 138 pub const CSTOPB: ::tcflag_t = 0x00000040; 139 pub const CREAD: ::tcflag_t = 0x00000080; 140 pub const PARENB: ::tcflag_t = 0x00000100; 141 pub const PARODD: ::tcflag_t = 0x00000200; 142 pub const HUPCL: ::tcflag_t = 0x00000400; 143 pub const CLOCAL: ::tcflag_t = 0x00000800; 144 pub const ECHOKE: ::tcflag_t = 0x00000800; 145 pub const ECHOE: ::tcflag_t = 0x00000010; 146 pub const ECHOK: ::tcflag_t = 0x00000020; 147 pub const ECHONL: ::tcflag_t = 0x00000040; 148 pub const ECHOPRT: ::tcflag_t = 0x00000400; 149 pub const ECHOCTL: ::tcflag_t = 0x00000200; 150 pub const ISIG: ::tcflag_t = 0x00000001; 151 pub const ICANON: ::tcflag_t = 0x00000002; 152 pub const PENDIN: ::tcflag_t = 0x00004000; 153 pub const NOFLSH: ::tcflag_t = 0x00000080; 154 155 pub const VEOL: usize = 11; 156 pub const VEOL2: usize = 16; 157 pub const VMIN: usize = 6; 158 pub const IEXTEN: ::tcflag_t = 0x00008000; 159 pub const TOSTOP: ::tcflag_t = 0x00000100; 160 pub const FLUSHO: ::tcflag_t = 0x00001000; 161 pub const EXTPROC: ::tcflag_t = 0x00010000; 162 pub const TCGETS: ::c_ulong = 0x5401; 163 pub const TCSETS: ::c_ulong = 0x5402; 164 pub const TCSETSW: ::c_ulong = 0x5403; 165 pub const TCSETSF: ::c_ulong = 0x5404; 166 pub const TCGETA: ::c_ulong = 0x5405; 167 pub const TCSETA: ::c_ulong = 0x5406; 168 pub const TCSETAW: ::c_ulong = 0x5407; 169 pub const TCSETAF: ::c_ulong = 0x5408; 170 pub const TCSBRK: ::c_ulong = 0x5409; 171 pub const TCXONC: ::c_ulong = 0x540A; 172 pub const TCFLSH: ::c_ulong = 0x540B; 173 pub const TIOCINQ: ::c_ulong = 0x541B; 174 pub const TIOCGPGRP: ::c_ulong = 0x540F; 175 pub const TIOCSPGRP: ::c_ulong = 0x5410; 176 pub const TIOCOUTQ: ::c_ulong = 0x5411; 177 pub const TIOCGWINSZ: ::c_ulong = 0x5413; 178 pub const TIOCSWINSZ: ::c_ulong = 0x5414; 179 pub const FIONREAD: ::c_ulong = 0x541B; 180