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 TCP_KEEPIDLE: ::c_int = 34; 32 pub const TCP_KEEPCNT: ::c_int = 35; 33 pub const TCP_KEEPINTVL: ::c_int = 36; 34 pub const TCP_CONGESTION: ::c_int = 37; 35 36 pub const F_OFD_GETLK: ::c_int = 50; 37 pub const F_OFD_SETLKL: ::c_int = 51; 38 pub const F_OFD_SETLKW: ::c_int = 52; 39 pub const F_FLOCK: ::c_int = 55; 40 pub const F_FLOCKW: ::c_int = 56; 41 42 pub const FIL_ATTACH: ::c_int = 0x1; 43 pub const FIL_DETACH: ::c_int = 0x2; 44 pub const FIL_LIST: ::c_int = 0x3; 45 pub const FILNAME_MAX: ::c_int = 32; 46 pub const FILF_PROG: ::c_int = 0x1; 47 pub const FILF_AUTO: ::c_int = 0x2; 48 pub const FILF_BYPASS: ::c_int = 0x4; 49 pub const SOL_FILTER: ::c_int = 0xfffc; 50 51 pub const MR_HDR_AOUT: ::c_uint = 0x3; 52 53 extern "C" { eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int54 pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int; 55 mincore(addr: ::caddr_t, len: ::size_t, vec: *mut ::c_char) -> ::c_int56 pub fn mincore(addr: ::caddr_t, len: ::size_t, vec: *mut ::c_char) -> ::c_int; 57 pset_bind_lwp( pset: ::psetid_t, id: ::id_t, pid: ::pid_t, opset: *mut ::psetid_t, ) -> ::c_int58 pub fn pset_bind_lwp( 59 pset: ::psetid_t, 60 id: ::id_t, 61 pid: ::pid_t, 62 opset: *mut ::psetid_t, 63 ) -> ::c_int; pset_getloadavg(pset: ::psetid_t, load: *mut ::c_double, num: ::c_int) -> ::c_int64 pub fn pset_getloadavg(pset: ::psetid_t, load: *mut ::c_double, num: ::c_int) -> ::c_int; 65 preadv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t66 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_t67 pub fn pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) 68 -> ::ssize_t; getpagesizes2(pagesize: *mut ::size_t, nelem: ::c_int) -> ::c_int69 pub fn getpagesizes2(pagesize: *mut ::size_t, nelem: ::c_int) -> ::c_int; 70 } 71