]>
Commit | Line | Data |
---|---|---|
92a42be0 SL |
1 | pub type c_char = i8; |
2 | pub type wchar_t = i32; | |
9cc50fc6 | 3 | |
54a0048b SL |
4 | s! { |
5 | pub struct mcontext_t { | |
6 | __private: [u32; 22] | |
7 | } | |
8 | ||
9 | pub struct ucontext_t { | |
10 | pub uc_flags: ::c_ulong, | |
11 | pub uc_link: *mut ucontext_t, | |
12 | pub uc_stack: ::stack_t, | |
13 | pub uc_mcontext: mcontext_t, | |
14 | pub uc_sigmask: ::sigset_t, | |
15 | __private: [u8; 112], | |
16 | } | |
17 | } | |
18 | ||
9cc50fc6 SL |
19 | pub const O_DIRECT: ::c_int = 0x4000; |
20 | pub const O_DIRECTORY: ::c_int = 0x10000; | |
21 | pub const O_NOFOLLOW: ::c_int = 0x20000; | |
22 | ||
23 | pub const MAP_LOCKED: ::c_int = 0x02000; | |
24 | pub const MAP_NORESERVE: ::c_int = 0x04000; | |
54a0048b | 25 | pub const MAP_32BIT: ::c_int = 0x0040; |
9cc50fc6 SL |
26 | |
27 | pub const EDEADLOCK: ::c_int = 35; | |
28 | ||
29 | pub const SO_PEERCRED: ::c_int = 17; | |
30 | pub const SO_RCVLOWAT: ::c_int = 18; | |
31 | pub const SO_SNDLOWAT: ::c_int = 19; | |
32 | pub const SO_RCVTIMEO: ::c_int = 20; | |
33 | pub const SO_SNDTIMEO: ::c_int = 21; | |
34 | ||
35 | pub const FIOCLEX: ::c_ulong = 0x5451; | |
36 | pub const FIONBIO: ::c_ulong = 0x5421; | |
54a0048b SL |
37 | |
38 | pub const SYS_gettid: ::c_long = 224; | |
39 | pub const SYS_perf_event_open: ::c_long = 336; | |
40 | ||
41 | extern { | |
42 | pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int; | |
43 | pub fn setcontext(ucp: *const ucontext_t) -> ::c_int; | |
44 | pub fn makecontext(ucp: *mut ucontext_t, | |
45 | func: extern fn (), | |
46 | argc: ::c_int, ...); | |
47 | pub fn swapcontext(uocp: *mut ucontext_t, | |
48 | ucp: *const ucontext_t) -> ::c_int; | |
49 | } |