summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-04-15 15:14:52 -0700
committerbors <bors@rust-lang.org>2016-04-15 15:14:52 -0700
commit779cde831264a37c8524a6046cff3da35a52a322 (patch)
tree47cd0bea694e22f70f7b067442c12777e5f1fa87
parentbab6a379cc055931c6a8ed4490dc6988c2a57149 (diff)
parentd780eec23a5604fafed132ef22ebd02354f90dd0 (diff)
downloadrust-libc-779cde831264a37c8524a6046cff3da35a52a322.tar.gz
Auto merge of #255 - fiveop:ucontext_musl, r=alexcrichton
Add ucontext for linux-musl. It just copy pasted from the linux-other version.
-rw-r--r--src/unix/notbsd/linux/musl/b32/x86.rs13
-rw-r--r--src/unix/notbsd/linux/musl/b64/x86_64.rs15
2 files changed, 28 insertions, 0 deletions
diff --git a/src/unix/notbsd/linux/musl/b32/x86.rs b/src/unix/notbsd/linux/musl/b32/x86.rs
index 2785547820..aae6c04573 100644
--- a/src/unix/notbsd/linux/musl/b32/x86.rs
+++ b/src/unix/notbsd/linux/musl/b32/x86.rs
@@ -82,6 +82,19 @@ s! {
pub f_flags: ::c_ulong,
pub f_spare: [::c_ulong; 4],
}
+
+ 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;
diff --git a/src/unix/notbsd/linux/musl/b64/x86_64.rs b/src/unix/notbsd/linux/musl/b64/x86_64.rs
index 168e242927..02324dae30 100644
--- a/src/unix/notbsd/linux/musl/b64/x86_64.rs
+++ b/src/unix/notbsd/linux/musl/b64/x86_64.rs
@@ -1,3 +1,18 @@
+s! {
+ pub struct mcontext_t {
+ __private: [u64; 32],
+ }
+
+ 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; 512],
+ }
+}
+
pub const SYS_gettid: ::c_long = 186;
pub const SYS_perf_event_open: ::c_long = 298;