]> git.proxmox.com Git - rustc.git/blobdiff - src/liblibc/src/unix/notbsd/linux/other/b32/x86.rs
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / liblibc / src / unix / notbsd / linux / other / b32 / x86.rs
index 45fa03f90dea0259a931b325f38bfcf2577b1de6..1b215a977dec4676aeac11434db066aa055cf987 100644 (file)
@@ -1,12 +1,28 @@
 pub type c_char = i8;
 pub type wchar_t = i32;
 
+s! {
+    pub struct mcontext_t {
+        __private: [u32; 22]
+    }
+
+    pub struct ucontext_t {
+        pub uc_flags: ::c_ulong,
+        pub uc_link: *mut ucontext_t,
+        pub uc_stack: ::stack_t,
+        pub uc_mcontext: mcontext_t,
+        pub uc_sigmask: ::sigset_t,
+        __private: [u8; 112],
+    }
+}
+
 pub const O_DIRECT: ::c_int = 0x4000;
 pub const O_DIRECTORY: ::c_int = 0x10000;
 pub const O_NOFOLLOW: ::c_int = 0x20000;
 
 pub const MAP_LOCKED: ::c_int = 0x02000;
 pub const MAP_NORESERVE: ::c_int = 0x04000;
+pub const MAP_32BIT: ::c_int = 0x0040;
 
 pub const EDEADLOCK: ::c_int = 35;
 
@@ -18,3 +34,16 @@ pub const SO_SNDTIMEO: ::c_int = 21;
 
 pub const FIOCLEX: ::c_ulong = 0x5451;
 pub const FIONBIO: ::c_ulong = 0x5421;
+
+pub const SYS_gettid: ::c_long = 224;
+pub const SYS_perf_event_open: ::c_long = 336;
+
+extern {
+    pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
+    pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
+    pub fn makecontext(ucp: *mut ucontext_t,
+                       func:  extern fn (),
+                       argc: ::c_int, ...);
+    pub fn swapcontext(uocp: *mut ucontext_t,
+                       ucp: *const ucontext_t) -> ::c_int;
+}