]> git.proxmox.com Git - rustc.git/blob - src/liblibc/src/unix/notbsd/linux/other/b32/x86.rs
Imported Upstream version 1.10.0+dfsg1
[rustc.git] / src / liblibc / src / unix / notbsd / linux / other / b32 / x86.rs
1 pub type c_char = i8;
2 pub type wchar_t = i32;
3 pub type greg_t = i32;
4
5 s! {
6 pub struct _libc_fpreg {
7 pub significand: [u16; 4],
8 pub exponent: u16,
9 }
10
11 pub struct _libc_fpstate {
12 pub cw: ::c_ulong,
13 pub sw: ::c_ulong,
14 pub tag: ::c_ulong,
15 pub ipoff: ::c_ulong,
16 pub cssel: ::c_ulong,
17 pub dataoff: ::c_ulong,
18 pub datasel: ::c_ulong,
19 pub _st: [_libc_fpreg; 8],
20 pub status: ::c_ulong,
21 }
22
23 pub struct mcontext_t {
24 pub gregs: [greg_t; 19],
25 pub fpregs: *mut _libc_fpstate,
26 pub oldmask: ::c_ulong,
27 pub cr2: ::c_ulong,
28 }
29
30 pub struct ucontext_t {
31 pub uc_flags: ::c_ulong,
32 pub uc_link: *mut ucontext_t,
33 pub uc_stack: ::stack_t,
34 pub uc_mcontext: mcontext_t,
35 pub uc_sigmask: ::sigset_t,
36 __private: [u8; 112],
37 }
38 }
39
40 pub const O_DIRECT: ::c_int = 0x4000;
41 pub const O_DIRECTORY: ::c_int = 0x10000;
42 pub const O_NOFOLLOW: ::c_int = 0x20000;
43
44 pub const MAP_LOCKED: ::c_int = 0x02000;
45 pub const MAP_NORESERVE: ::c_int = 0x04000;
46 pub const MAP_32BIT: ::c_int = 0x0040;
47
48 pub const EDEADLOCK: ::c_int = 35;
49
50 pub const SO_PEERCRED: ::c_int = 17;
51 pub const SO_RCVLOWAT: ::c_int = 18;
52 pub const SO_SNDLOWAT: ::c_int = 19;
53 pub const SO_RCVTIMEO: ::c_int = 20;
54 pub const SO_SNDTIMEO: ::c_int = 21;
55
56 pub const FIOCLEX: ::c_ulong = 0x5451;
57 pub const FIONBIO: ::c_ulong = 0x5421;
58
59 pub const SYS_gettid: ::c_long = 224;
60 pub const SYS_perf_event_open: ::c_long = 336;
61
62 extern {
63 pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
64 pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
65 pub fn makecontext(ucp: *mut ucontext_t,
66 func: extern fn (),
67 argc: ::c_int, ...);
68 pub fn swapcontext(uocp: *mut ucontext_t,
69 ucp: *const ucontext_t) -> ::c_int;
70 }