1 s! { 2 pub struct shmid_ds { 3 pub shm_perm: ::ipc_perm, 4 pub shm_segsz: ::size_t, 5 pub shm_amp: *mut ::c_void, 6 pub shm_lkcnt: ::c_ushort, 7 pub shm_lpid: ::pid_t, 8 pub shm_cpid: ::pid_t, 9 pub shm_nattch: ::shmatt_t, 10 pub shm_cnattch: ::c_ulong, 11 pub shm_atime: ::time_t, 12 pub shm_dtime: ::time_t, 13 pub shm_ctime: ::time_t, 14 pub shm_pad4: [i64; 4], 15 } 16 17 pub struct fil_info { 18 pub fi_flags: ::c_int, 19 pub fi_pos: ::c_int, 20 pub fi_name: [::c_char; ::FILNAME_MAX as usize], 21 } 22 } 23 24 pub const AF_LOCAL: ::c_int = 1; // AF_UNIX 25 pub const AF_FILE: ::c_int = 1; // AF_UNIX 26 27 pub const EFD_SEMAPHORE: ::c_int = 0x1; 28 pub const EFD_NONBLOCK: ::c_int = 0x800; 29 pub const EFD_CLOEXEC: ::c_int = 0x80000; 30 31 pub const POLLRDHUP: ::c_short = 0x4000; 32 33 pub const TCP_KEEPIDLE: ::c_int = 34; 34 pub const TCP_KEEPCNT: ::c_int = 35; 35 pub const TCP_KEEPINTVL: ::c_int = 36; 36 pub const TCP_CONGESTION: ::c_int = 37; 37 38 // These constants are correct for 64-bit programs or 32-bit programs that are 39 // not using large-file mode. If Rust ever supports anything other than 64-bit 40 // compilation on illumos, this may require adjustment: 41 pub const F_OFD_GETLK: ::c_int = 47; 42 pub const F_OFD_SETLK: ::c_int = 48; 43 pub const F_OFD_SETLKW: ::c_int = 49; 44 pub const F_FLOCK: ::c_int = 53; 45 pub const F_FLOCKW: ::c_int = 54; 46 47 pub const F_DUPFD_CLOEXEC: ::c_int = 37; 48 pub const F_DUP2FD_CLOEXEC: ::c_int = 36; 49 50 pub const FIL_ATTACH: ::c_int = 0x1; 51 pub const FIL_DETACH: ::c_int = 0x2; 52 pub const FIL_LIST: ::c_int = 0x3; 53 pub const FILNAME_MAX: ::c_int = 32; 54 pub const FILF_PROG: ::c_int = 0x1; 55 pub const FILF_AUTO: ::c_int = 0x2; 56 pub const FILF_BYPASS: ::c_int = 0x4; 57 pub const SOL_FILTER: ::c_int = 0xfffc; 58 59 pub const MADV_PURGE: ::c_int = 9; 60 61 pub const POSIX_FADV_NORMAL: ::c_int = 0; 62 pub const POSIX_FADV_RANDOM: ::c_int = 1; 63 pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2; 64 pub const POSIX_FADV_WILLNEED: ::c_int = 3; 65 pub const POSIX_FADV_DONTNEED: ::c_int = 4; 66 pub const POSIX_FADV_NOREUSE: ::c_int = 5; 67 68 pub const B1000000: ::speed_t = 24; 69 pub const B1152000: ::speed_t = 25; 70 pub const B1500000: ::speed_t = 26; 71 pub const B2000000: ::speed_t = 27; 72 pub const B2500000: ::speed_t = 28; 73 pub const B3000000: ::speed_t = 29; 74 pub const B3500000: ::speed_t = 30; 75 pub const B4000000: ::speed_t = 31; 76 77 // sys/systeminfo.h 78 pub const SI_ADDRESS_WIDTH: ::c_int = 520; 79 80 extern "C" { eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int81 pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int; 82 mincore(addr: ::caddr_t, len: ::size_t, vec: *mut ::c_char) -> ::c_int83 pub fn mincore(addr: ::caddr_t, len: ::size_t, vec: *mut ::c_char) -> ::c_int; 84 pset_bind_lwp( pset: ::psetid_t, id: ::id_t, pid: ::pid_t, opset: *mut ::psetid_t, ) -> ::c_int85 pub fn pset_bind_lwp( 86 pset: ::psetid_t, 87 id: ::id_t, 88 pid: ::pid_t, 89 opset: *mut ::psetid_t, 90 ) -> ::c_int; pset_getloadavg(pset: ::psetid_t, load: *mut ::c_double, num: ::c_int) -> ::c_int91 pub fn pset_getloadavg(pset: ::psetid_t, load: *mut ::c_double, num: ::c_int) -> ::c_int; 92 pthread_attr_get_np(thread: ::pthread_t, attr: *mut ::pthread_attr_t) -> ::c_int93 pub fn pthread_attr_get_np(thread: ::pthread_t, attr: *mut ::pthread_attr_t) -> ::c_int; pthread_attr_getstackaddr( attr: *const ::pthread_attr_t, stackaddr: *mut *mut ::c_void, ) -> ::c_int94 pub fn pthread_attr_getstackaddr( 95 attr: *const ::pthread_attr_t, 96 stackaddr: *mut *mut ::c_void, 97 ) -> ::c_int; pthread_attr_setstack( attr: *mut ::pthread_attr_t, stackaddr: *mut ::c_void, stacksize: ::size_t, ) -> ::c_int98 pub fn pthread_attr_setstack( 99 attr: *mut ::pthread_attr_t, 100 stackaddr: *mut ::c_void, 101 stacksize: ::size_t, 102 ) -> ::c_int; pthread_attr_setstackaddr( attr: *mut ::pthread_attr_t, stackaddr: *mut ::c_void, ) -> ::c_int103 pub fn pthread_attr_setstackaddr( 104 attr: *mut ::pthread_attr_t, 105 stackaddr: *mut ::c_void, 106 ) -> ::c_int; 107 posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t, advice: ::c_int) -> ::c_int108 pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t, advice: ::c_int) -> ::c_int; preadv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t109 pub fn preadv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t; pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t110 pub fn pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) 111 -> ::ssize_t; getpagesizes2(pagesize: *mut ::size_t, nelem: ::c_int) -> ::c_int112 pub fn getpagesizes2(pagesize: *mut ::size_t, nelem: ::c_int) -> ::c_int; 113 ptsname_r(fildes: ::c_int, name: *mut ::c_char, namelen: ::size_t) -> ::c_int114 pub fn ptsname_r(fildes: ::c_int, name: *mut ::c_char, namelen: ::size_t) -> ::c_int; 115 } 116