1 // FIXME(ulibc): this module has definitions that are redundant with the parent 2 #![allow(dead_code)] 3 4 use crate::off64_t; 5 use crate::prelude::*; 6 7 pub type shmatt_t = c_ulong; 8 pub type msgqnum_t = c_ulong; 9 pub type msglen_t = c_ulong; 10 pub type regoff_t = c_int; 11 pub type rlim_t = c_ulong; 12 pub type __rlimit_resource_t = c_ulong; 13 pub type __priority_which_t = c_uint; 14 15 cfg_if! { 16 if #[cfg(doc)] { 17 // Used in `linux::arch` to define ioctl constants. 18 pub(crate) type Ioctl = c_ulong; 19 } else { 20 #[doc(hidden)] 21 pub type Ioctl = c_ulong; 22 } 23 } 24 25 s! { 26 pub struct statvfs { 27 // Different than GNU! 28 pub f_bsize: c_ulong, 29 pub f_frsize: c_ulong, 30 pub f_blocks: crate::fsblkcnt_t, 31 pub f_bfree: crate::fsblkcnt_t, 32 pub f_bavail: crate::fsblkcnt_t, 33 pub f_files: crate::fsfilcnt_t, 34 pub f_ffree: crate::fsfilcnt_t, 35 pub f_favail: crate::fsfilcnt_t, 36 #[cfg(target_endian = "little")] 37 pub f_fsid: c_ulong, 38 #[cfg(target_pointer_width = "32")] 39 __f_unused: c_int, 40 #[cfg(target_endian = "big")] 41 pub f_fsid: c_ulong, 42 pub f_flag: c_ulong, 43 pub f_namemax: c_ulong, 44 __f_spare: [c_int; 6], 45 } 46 47 pub struct regex_t { 48 __buffer: *mut c_void, 49 __allocated: size_t, 50 __used: size_t, 51 __syntax: c_ulong, 52 __fastmap: *mut c_char, 53 __translate: *mut c_char, 54 __re_nsub: size_t, 55 __bitfield: u8, 56 } 57 58 pub struct rtentry { 59 pub rt_pad1: c_ulong, 60 pub rt_dst: crate::sockaddr, 61 pub rt_gateway: crate::sockaddr, 62 pub rt_genmask: crate::sockaddr, 63 pub rt_flags: c_ushort, 64 pub rt_pad2: c_short, 65 pub rt_pad3: c_ulong, 66 pub rt_tos: c_uchar, 67 pub rt_class: c_uchar, 68 #[cfg(target_pointer_width = "64")] 69 pub rt_pad4: [c_short; 3usize], 70 #[cfg(not(target_pointer_width = "64"))] 71 pub rt_pad4: c_short, 72 pub rt_metric: c_short, 73 pub rt_dev: *mut c_char, 74 pub rt_mtu: c_ulong, 75 pub rt_window: c_ulong, 76 pub rt_irtt: c_ushort, 77 } 78 79 pub struct __exit_status { 80 pub e_termination: c_short, 81 pub e_exit: c_short, 82 } 83 84 pub struct ptrace_peeksiginfo_args { 85 pub off: crate::__u64, 86 pub flags: crate::__u32, 87 pub nr: crate::__s32, 88 } 89 90 #[cfg_attr( 91 any( 92 target_pointer_width = "32", 93 target_arch = "x86_64", 94 target_arch = "powerpc64", 95 target_arch = "mips64", 96 target_arch = "s390x", 97 target_arch = "sparc64" 98 ), 99 repr(align(4)) 100 )] 101 #[cfg_attr( 102 not(any( 103 target_pointer_width = "32", 104 target_arch = "x86_64", 105 target_arch = "powerpc64", 106 target_arch = "mips64", 107 target_arch = "s390x", 108 target_arch = "sparc64" 109 )), 110 repr(align(8)) 111 )] 112 pub struct pthread_mutexattr_t { 113 size: [u8; crate::__SIZEOF_PTHREAD_MUTEXATTR_T], 114 } 115 116 #[repr(align(4))] 117 pub struct pthread_condattr_t { 118 size: [u8; crate::__SIZEOF_PTHREAD_CONDATTR_T], 119 } 120 121 pub struct tcp_info { 122 pub tcpi_state: u8, 123 pub tcpi_ca_state: u8, 124 pub tcpi_retransmits: u8, 125 pub tcpi_probes: u8, 126 pub tcpi_backoff: u8, 127 pub tcpi_options: u8, 128 /// This contains the bitfields `tcpi_snd_wscale` and `tcpi_rcv_wscale`. 129 /// Each is 4 bits. 130 pub tcpi_snd_rcv_wscale: u8, 131 pub tcpi_rto: u32, 132 pub tcpi_ato: u32, 133 pub tcpi_snd_mss: u32, 134 pub tcpi_rcv_mss: u32, 135 pub tcpi_unacked: u32, 136 pub tcpi_sacked: u32, 137 pub tcpi_lost: u32, 138 pub tcpi_retrans: u32, 139 pub tcpi_fackets: u32, 140 pub tcpi_last_data_sent: u32, 141 pub tcpi_last_ack_sent: u32, 142 pub tcpi_last_data_recv: u32, 143 pub tcpi_last_ack_recv: u32, 144 pub tcpi_pmtu: u32, 145 pub tcpi_rcv_ssthresh: u32, 146 pub tcpi_rtt: u32, 147 pub tcpi_rttvar: u32, 148 pub tcpi_snd_ssthresh: u32, 149 pub tcpi_snd_cwnd: u32, 150 pub tcpi_advmss: u32, 151 pub tcpi_reordering: u32, 152 pub tcpi_rcv_rtt: u32, 153 pub tcpi_rcv_space: u32, 154 pub tcpi_total_retrans: u32, 155 } 156 } 157 158 impl siginfo_t { si_addr(&self) -> *mut c_void159 pub unsafe fn si_addr(&self) -> *mut c_void { 160 #[repr(C)] 161 struct siginfo_sigfault { 162 _si_signo: c_int, 163 _si_errno: c_int, 164 _si_code: c_int, 165 si_addr: *mut c_void, 166 } 167 (*(self as *const siginfo_t as *const siginfo_sigfault)).si_addr 168 } 169 si_value(&self) -> crate::sigval170 pub unsafe fn si_value(&self) -> crate::sigval { 171 #[repr(C)] 172 struct siginfo_si_value { 173 _si_signo: c_int, 174 _si_errno: c_int, 175 _si_code: c_int, 176 _si_timerid: c_int, 177 _si_overrun: c_int, 178 si_value: crate::sigval, 179 } 180 (*(self as *const siginfo_t as *const siginfo_si_value)).si_value 181 } 182 } 183 184 // Internal, for casts to access union fields 185 #[repr(C)] 186 struct sifields_sigchld { 187 si_pid: crate::pid_t, 188 si_uid: crate::uid_t, 189 si_status: c_int, 190 si_utime: c_long, 191 si_stime: c_long, 192 } 193 impl Copy for sifields_sigchld {} 194 impl Clone for sifields_sigchld { clone(&self) -> sifields_sigchld195 fn clone(&self) -> sifields_sigchld { 196 *self 197 } 198 } 199 200 // Internal, for casts to access union fields 201 #[repr(C)] 202 union sifields { 203 _align_pointer: *mut c_void, 204 sigchld: sifields_sigchld, 205 } 206 207 // Internal, for casts to access union fields. Note that some variants 208 // of sifields start with a pointer, which makes the alignment of 209 // sifields vary on 32-bit and 64-bit architectures. 210 #[repr(C)] 211 struct siginfo_f { 212 _siginfo_base: [c_int; 3], 213 sifields: sifields, 214 } 215 216 impl siginfo_t { sifields(&self) -> &sifields217 unsafe fn sifields(&self) -> &sifields { 218 &(*(self as *const siginfo_t as *const siginfo_f)).sifields 219 } 220 si_pid(&self) -> crate::pid_t221 pub unsafe fn si_pid(&self) -> crate::pid_t { 222 self.sifields().sigchld.si_pid 223 } 224 si_uid(&self) -> crate::uid_t225 pub unsafe fn si_uid(&self) -> crate::uid_t { 226 self.sifields().sigchld.si_uid 227 } 228 si_status(&self) -> c_int229 pub unsafe fn si_status(&self) -> c_int { 230 self.sifields().sigchld.si_status 231 } 232 si_utime(&self) -> c_long233 pub unsafe fn si_utime(&self) -> c_long { 234 self.sifields().sigchld.si_utime 235 } 236 si_stime(&self) -> c_long237 pub unsafe fn si_stime(&self) -> c_long { 238 self.sifields().sigchld.si_stime 239 } 240 } 241 242 pub const MCL_CURRENT: c_int = 0x0001; 243 pub const MCL_FUTURE: c_int = 0x0002; 244 pub const MCL_ONFAULT: c_int = 0x0004; 245 246 pub const SIGEV_THREAD_ID: c_int = 4; 247 248 pub const AF_VSOCK: c_int = 40; 249 250 // Most `*_SUPER_MAGIC` constants are defined at the `linux_like` level; the 251 // following are only available on newer Linux versions than the versions 252 // currently used in CI in some configurations, so we define them here. 253 pub const BINDERFS_SUPER_MAGIC: c_long = 0x6c6f6f70; 254 pub const XFS_SUPER_MAGIC: c_long = 0x58465342; 255 256 pub const PTRACE_TRACEME: c_int = 0; 257 pub const PTRACE_PEEKTEXT: c_int = 1; 258 pub const PTRACE_PEEKDATA: c_int = 2; 259 pub const PTRACE_PEEKUSER: c_int = 3; 260 pub const PTRACE_POKETEXT: c_int = 4; 261 pub const PTRACE_POKEDATA: c_int = 5; 262 pub const PTRACE_POKEUSER: c_int = 6; 263 pub const PTRACE_CONT: c_int = 7; 264 pub const PTRACE_KILL: c_int = 8; 265 pub const PTRACE_SINGLESTEP: c_int = 9; 266 pub const PTRACE_GETREGS: c_int = 12; 267 pub const PTRACE_SETREGS: c_int = 13; 268 pub const PTRACE_GETFPREGS: c_int = 14; 269 pub const PTRACE_SETFPREGS: c_int = 15; 270 pub const PTRACE_ATTACH: c_int = 16; 271 pub const PTRACE_DETACH: c_int = 17; 272 pub const PTRACE_GETFPXREGS: c_int = 18; 273 pub const PTRACE_SETFPXREGS: c_int = 19; 274 pub const PTRACE_SYSCALL: c_int = 24; 275 pub const PTRACE_SETOPTIONS: c_int = 0x4200; 276 pub const PTRACE_GETEVENTMSG: c_int = 0x4201; 277 pub const PTRACE_GETSIGINFO: c_int = 0x4202; 278 pub const PTRACE_SETSIGINFO: c_int = 0x4203; 279 pub const PTRACE_GETREGSET: c_int = 0x4204; 280 pub const PTRACE_SETREGSET: c_int = 0x4205; 281 pub const PTRACE_SEIZE: c_int = 0x4206; 282 pub const PTRACE_INTERRUPT: c_int = 0x4207; 283 pub const PTRACE_LISTEN: c_int = 0x4208; 284 285 pub const POSIX_FADV_DONTNEED: c_int = 4; 286 pub const POSIX_FADV_NOREUSE: c_int = 5; 287 288 // These are different than GNU! 289 pub const LC_CTYPE: c_int = 0; 290 pub const LC_NUMERIC: c_int = 1; 291 pub const LC_TIME: c_int = 3; 292 pub const LC_COLLATE: c_int = 4; 293 pub const LC_MONETARY: c_int = 2; 294 pub const LC_MESSAGES: c_int = 5; 295 pub const LC_ALL: c_int = 6; 296 // end different section 297 298 // MS_ flags for mount(2) 299 pub const MS_RMT_MASK: c_ulong = 300 crate::MS_RDONLY | crate::MS_SYNCHRONOUS | crate::MS_MANDLOCK | crate::MS_I_VERSION; 301 302 pub const ENOTSUP: c_int = EOPNOTSUPP; 303 304 pub const IPV6_JOIN_GROUP: c_int = 20; 305 pub const IPV6_LEAVE_GROUP: c_int = 21; 306 307 // These are different from GNU 308 pub const ABDAY_1: crate::nl_item = 0x300; 309 pub const ABDAY_2: crate::nl_item = 0x301; 310 pub const ABDAY_3: crate::nl_item = 0x302; 311 pub const ABDAY_4: crate::nl_item = 0x303; 312 pub const ABDAY_5: crate::nl_item = 0x304; 313 pub const ABDAY_6: crate::nl_item = 0x305; 314 pub const ABDAY_7: crate::nl_item = 0x306; 315 pub const DAY_1: crate::nl_item = 0x307; 316 pub const DAY_2: crate::nl_item = 0x308; 317 pub const DAY_3: crate::nl_item = 0x309; 318 pub const DAY_4: crate::nl_item = 0x30A; 319 pub const DAY_5: crate::nl_item = 0x30B; 320 pub const DAY_6: crate::nl_item = 0x30C; 321 pub const DAY_7: crate::nl_item = 0x30D; 322 pub const ABMON_1: crate::nl_item = 0x30E; 323 pub const ABMON_2: crate::nl_item = 0x30F; 324 pub const ABMON_3: crate::nl_item = 0x310; 325 pub const ABMON_4: crate::nl_item = 0x311; 326 pub const ABMON_5: crate::nl_item = 0x312; 327 pub const ABMON_6: crate::nl_item = 0x313; 328 pub const ABMON_7: crate::nl_item = 0x314; 329 pub const ABMON_8: crate::nl_item = 0x315; 330 pub const ABMON_9: crate::nl_item = 0x316; 331 pub const ABMON_10: crate::nl_item = 0x317; 332 pub const ABMON_11: crate::nl_item = 0x318; 333 pub const ABMON_12: crate::nl_item = 0x319; 334 pub const MON_1: crate::nl_item = 0x31A; 335 pub const MON_2: crate::nl_item = 0x31B; 336 pub const MON_3: crate::nl_item = 0x31C; 337 pub const MON_4: crate::nl_item = 0x31D; 338 pub const MON_5: crate::nl_item = 0x31E; 339 pub const MON_6: crate::nl_item = 0x31F; 340 pub const MON_7: crate::nl_item = 0x320; 341 pub const MON_8: crate::nl_item = 0x321; 342 pub const MON_9: crate::nl_item = 0x322; 343 pub const MON_10: crate::nl_item = 0x323; 344 pub const MON_11: crate::nl_item = 0x324; 345 pub const MON_12: crate::nl_item = 0x325; 346 pub const AM_STR: crate::nl_item = 0x326; 347 pub const PM_STR: crate::nl_item = 0x327; 348 pub const D_T_FMT: crate::nl_item = 0x328; 349 pub const D_FMT: crate::nl_item = 0x329; 350 pub const T_FMT: crate::nl_item = 0x32A; 351 pub const T_FMT_AMPM: crate::nl_item = 0x32B; 352 pub const ERA: crate::nl_item = 0x32C; 353 pub const ERA_D_FMT: crate::nl_item = 0x32E; 354 pub const ALT_DIGITS: crate::nl_item = 0x32F; 355 pub const ERA_D_T_FMT: crate::nl_item = 0x330; 356 pub const ERA_T_FMT: crate::nl_item = 0x331; 357 pub const CODESET: crate::nl_item = 10; 358 pub const CRNCYSTR: crate::nl_item = 0x215; 359 pub const RADIXCHAR: crate::nl_item = 0x100; 360 pub const THOUSEP: crate::nl_item = 0x101; 361 pub const NOEXPR: crate::nl_item = 0x501; 362 pub const YESSTR: crate::nl_item = 0x502; 363 pub const NOSTR: crate::nl_item = 0x503; 364 365 // Different than Gnu. 366 pub const FILENAME_MAX: c_uint = 4095; 367 368 pub const PRIO_PROCESS: c_int = 0; 369 pub const PRIO_PGRP: c_int = 1; 370 pub const PRIO_USER: c_int = 2; 371 372 pub const SOMAXCONN: c_int = 128; 373 374 pub const ST_RELATIME: c_ulong = 4096; 375 376 pub const AF_NFC: c_int = PF_NFC; 377 pub const BUFSIZ: c_int = 4096; 378 pub const EDEADLOCK: c_int = EDEADLK; 379 pub const EXTA: c_uint = B19200; 380 pub const EXTB: c_uint = B38400; 381 pub const EXTPROC: crate::tcflag_t = 0o200000; 382 pub const FOPEN_MAX: c_int = 16; 383 pub const F_GETOWN: c_int = 9; 384 pub const F_OFD_GETLK: c_int = 36; 385 pub const F_OFD_SETLK: c_int = 37; 386 pub const F_OFD_SETLKW: c_int = 38; 387 pub const F_RDLCK: c_int = 0; 388 pub const F_SETOWN: c_int = 8; 389 pub const F_UNLCK: c_int = 2; 390 pub const F_WRLCK: c_int = 1; 391 pub const IPV6_MULTICAST_ALL: c_int = 29; 392 pub const IPV6_ROUTER_ALERT_ISOLATE: c_int = 30; 393 pub const MAP_HUGE_SHIFT: c_int = 26; 394 pub const MAP_HUGE_MASK: c_int = 0x3f; 395 pub const MAP_HUGE_64KB: c_int = 16 << MAP_HUGE_SHIFT; 396 pub const MAP_HUGE_512KB: c_int = 19 << MAP_HUGE_SHIFT; 397 pub const MAP_HUGE_1MB: c_int = 20 << MAP_HUGE_SHIFT; 398 pub const MAP_HUGE_2MB: c_int = 21 << MAP_HUGE_SHIFT; 399 pub const MAP_HUGE_8MB: c_int = 23 << MAP_HUGE_SHIFT; 400 pub const MAP_HUGE_16MB: c_int = 24 << MAP_HUGE_SHIFT; 401 pub const MAP_HUGE_32MB: c_int = 25 << MAP_HUGE_SHIFT; 402 pub const MAP_HUGE_256MB: c_int = 28 << MAP_HUGE_SHIFT; 403 pub const MAP_HUGE_512MB: c_int = 29 << MAP_HUGE_SHIFT; 404 pub const MAP_HUGE_1GB: c_int = 30 << MAP_HUGE_SHIFT; 405 pub const MAP_HUGE_2GB: c_int = 31 << MAP_HUGE_SHIFT; 406 pub const MAP_HUGE_16GB: c_int = 34 << MAP_HUGE_SHIFT; 407 pub const MINSIGSTKSZ: c_int = 2048; 408 pub const MSG_COPY: c_int = 0o40000; 409 pub const NI_MAXHOST: crate::socklen_t = 1025; 410 pub const O_TMPFILE: c_int = 0o20000000 | O_DIRECTORY; 411 pub const PACKET_MR_UNICAST: c_int = 3; 412 pub const PF_NFC: c_int = 39; 413 pub const PF_VSOCK: c_int = 40; 414 pub const POSIX_MADV_DONTNEED: c_int = 4; 415 pub const PTRACE_EVENT_STOP: c_int = 128; 416 pub const PTRACE_GETSIGMASK: c_uint = 0x420a; 417 pub const PTRACE_PEEKSIGINFO: c_int = 0x4209; 418 pub const PTRACE_SETSIGMASK: c_uint = 0x420b; 419 pub const RTLD_NOLOAD: c_int = 0x00004; 420 pub const RUSAGE_THREAD: c_int = 1; 421 pub const SHM_EXEC: c_int = 0o100000; 422 pub const SIGPOLL: c_int = SIGIO; 423 pub const SOCK_DCCP: c_int = 6; 424 #[deprecated(since = "0.2.70", note = "AF_PACKET must be used instead")] 425 pub const SOCK_PACKET: c_int = 10; 426 pub const TCP_COOKIE_TRANSACTIONS: c_int = 15; 427 pub const UDP_GRO: c_int = 104; 428 pub const UDP_SEGMENT: c_int = 103; 429 pub const YESEXPR: c_int = ((5) << 8) | (0); 430 431 extern "C" { gettimeofday(tp: *mut crate::timeval, tz: *mut crate::timezone) -> c_int432 pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut crate::timezone) -> c_int; 433 pthread_rwlockattr_getkind_np( attr: *const crate::pthread_rwlockattr_t, val: *mut c_int, ) -> c_int434 pub fn pthread_rwlockattr_getkind_np( 435 attr: *const crate::pthread_rwlockattr_t, 436 val: *mut c_int, 437 ) -> c_int; pthread_rwlockattr_setkind_np( attr: *mut crate::pthread_rwlockattr_t, val: c_int, ) -> c_int438 pub fn pthread_rwlockattr_setkind_np( 439 attr: *mut crate::pthread_rwlockattr_t, 440 val: c_int, 441 ) -> c_int; 442 ptrace(request: c_uint, ...) -> c_long443 pub fn ptrace(request: c_uint, ...) -> c_long; 444 sendmmsg( sockfd: c_int, msgvec: *mut crate::mmsghdr, vlen: c_uint, flags: c_int, ) -> c_int445 pub fn sendmmsg( 446 sockfd: c_int, 447 msgvec: *mut crate::mmsghdr, 448 vlen: c_uint, 449 flags: c_int, 450 ) -> c_int; recvmmsg( sockfd: c_int, msgvec: *mut crate::mmsghdr, vlen: c_uint, flags: c_int, timeout: *mut crate::timespec, ) -> c_int451 pub fn recvmmsg( 452 sockfd: c_int, 453 msgvec: *mut crate::mmsghdr, 454 vlen: c_uint, 455 flags: c_int, 456 timeout: *mut crate::timespec, 457 ) -> c_int; 458 openpty( amaster: *mut c_int, aslave: *mut c_int, name: *mut c_char, termp: *mut termios, winp: *mut crate::winsize, ) -> c_int459 pub fn openpty( 460 amaster: *mut c_int, 461 aslave: *mut c_int, 462 name: *mut c_char, 463 termp: *mut termios, 464 winp: *mut crate::winsize, 465 ) -> c_int; forkpty( amaster: *mut c_int, name: *mut c_char, termp: *mut termios, winp: *mut crate::winsize, ) -> crate::pid_t466 pub fn forkpty( 467 amaster: *mut c_int, 468 name: *mut c_char, 469 termp: *mut termios, 470 winp: *mut crate::winsize, 471 ) -> crate::pid_t; 472 getnameinfo( sa: *const crate::sockaddr, salen: crate::socklen_t, host: *mut c_char, hostlen: crate::socklen_t, serv: *mut c_char, servlen: crate::socklen_t, flags: c_int, ) -> c_int473 pub fn getnameinfo( 474 sa: *const crate::sockaddr, 475 salen: crate::socklen_t, 476 host: *mut c_char, 477 hostlen: crate::socklen_t, 478 serv: *mut c_char, 479 servlen: crate::socklen_t, 480 flags: c_int, 481 ) -> c_int; 482 pwritev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off64_t) -> ssize_t483 pub fn pwritev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off64_t) -> ssize_t; preadv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off64_t) -> ssize_t484 pub fn preadv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off64_t) -> ssize_t; 485 sethostid(hostid: c_long) -> c_int486 pub fn sethostid(hostid: c_long) -> c_int; fanotify_mark( fd: c_int, flags: c_uint, mask: u64, dirfd: c_int, path: *const c_char, ) -> c_int487 pub fn fanotify_mark( 488 fd: c_int, 489 flags: c_uint, 490 mask: u64, 491 dirfd: c_int, 492 path: *const c_char, 493 ) -> c_int; getrlimit64(resource: crate::__rlimit_resource_t, rlim: *mut crate::rlimit64) -> c_int494 pub fn getrlimit64(resource: crate::__rlimit_resource_t, rlim: *mut crate::rlimit64) -> c_int; setrlimit64(resource: crate::__rlimit_resource_t, rlim: *const crate::rlimit64) -> c_int495 pub fn setrlimit64(resource: crate::__rlimit_resource_t, rlim: *const crate::rlimit64) 496 -> c_int; getrlimit(resource: crate::__rlimit_resource_t, rlim: *mut crate::rlimit) -> c_int497 pub fn getrlimit(resource: crate::__rlimit_resource_t, rlim: *mut crate::rlimit) -> c_int; setrlimit(resource: crate::__rlimit_resource_t, rlim: *const crate::rlimit) -> c_int498 pub fn setrlimit(resource: crate::__rlimit_resource_t, rlim: *const crate::rlimit) -> c_int; getpriority(which: crate::__priority_which_t, who: crate::id_t) -> c_int499 pub fn getpriority(which: crate::__priority_which_t, who: crate::id_t) -> c_int; setpriority(which: crate::__priority_which_t, who: crate::id_t, prio: c_int) -> c_int500 pub fn setpriority(which: crate::__priority_which_t, who: crate::id_t, prio: c_int) -> c_int; getauxval(type_: c_ulong) -> c_ulong501 pub fn getauxval(type_: c_ulong) -> c_ulong; 502 } 503 504 cfg_if! { 505 if #[cfg(any(target_arch = "mips", target_arch = "mips64"))] { 506 mod mips; 507 pub use self::mips::*; 508 } else if #[cfg(target_arch = "x86_64")] { 509 mod x86_64; 510 pub use self::x86_64::*; 511 } else if #[cfg(target_arch = "arm")] { 512 mod arm; 513 pub use self::arm::*; 514 } else { 515 pub use unsupported_target; 516 } 517 } 518