Skip to content

Add ucontext for linux-musl. #255

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Apr 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/unix/notbsd/linux/musl/b32/x86.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
15 changes: 15 additions & 0 deletions src/unix/notbsd/linux/musl/b64/x86_64.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
s! {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently structs come before constants, but otherwise this looks good to me!

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;