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 
18 pub const AF_LOCAL: ::c_int = 1; // AF_UNIX
19 pub const AF_FILE: ::c_int = 1; // AF_UNIX
20 
21 pub const EFD_SEMAPHORE: ::c_int = 0x1;
22 pub const EFD_NONBLOCK: ::c_int = 0x800;
23 pub const EFD_CLOEXEC: ::c_int = 0x80000;
24 
25 pub const TCP_KEEPIDLE: ::c_int = 34;
26 pub const TCP_KEEPCNT: ::c_int = 35;
27 pub const TCP_KEEPINTVL: ::c_int = 36;
28 pub const TCP_CONGESTION: ::c_int = 37;
29 
30 pub const F_OFD_GETLK: ::c_int = 50;
31 pub const F_OFD_SETLKL: ::c_int = 51;
32 pub const F_OFD_SETLKW: ::c_int = 52;
33 pub const F_FLOCK: ::c_int = 55;
34 pub const F_FLOCKW: ::c_int = 56;
35 
36 extern "C" {
37     pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
38 
39     pub fn mincore(addr: ::caddr_t, len: ::size_t, vec: *mut ::c_char) -> ::c_int;
40 
41     pub fn pset_bind_lwp(
42         pset: ::psetid_t,
43         id: ::id_t,
44         pid: ::pid_t,
45         opset: *mut ::psetid_t,
46     ) -> ::c_int;
47     pub fn pset_getloadavg(pset: ::psetid_t, load: *mut ::c_double, num: ::c_int) -> ::c_int;
48 
49     pub fn preadv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t;
50     pub fn pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t)
51         -> ::ssize_t;
52 }
53