Skip to content

Commit

Permalink
move declarations of mcontext_t and ucontext_t
Browse files Browse the repository at this point in the history
  • Loading branch information
bsteinb committed Jan 5, 2021
1 parent d57347a commit ee84dae
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
11 changes: 11 additions & 0 deletions src/unix/bsd/apple/b64/aarch64/align.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
pub type mcontext_t = *mut __darwin_mcontext64;

s_no_extra_traits! {
#[allow(missing_debug_implementations)]
pub struct max_align_t {
Expand All @@ -6,6 +8,15 @@ s_no_extra_traits! {
}

s! {
pub struct ucontext_t {
pub uc_onstack: ::c_int,
pub uc_sigmask: ::sigset_t,
pub uc_stack: ::stack_t,
pub uc_link: *mut ::ucontext_t,
pub uc_mcsize: usize,
pub uc_mcontext: mcontext_t,
}

pub struct __darwin_mcontext64 {
pub __es: __darwin_arm_exception_state64,
pub __ss: __darwin_arm_thread_state64,
Expand Down
10 changes: 0 additions & 10 deletions src/unix/bsd/apple/b64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

pub type c_long = i64;
pub type c_ulong = u64;
pub type mcontext_t = *mut __darwin_mcontext64;

s! {
pub struct timeval32 {
Expand Down Expand Up @@ -48,15 +47,6 @@ s! {
pub bh_datalen: u32,
pub bh_hdrlen: ::c_ushort,
}

pub struct ucontext_t {
pub uc_onstack: ::c_int,
pub uc_sigmask: ::sigset_t,
pub uc_stack: ::stack_t,
pub uc_link: *mut ::ucontext_t,
pub uc_mcsize: usize,
pub uc_mcontext: mcontext_t,
}
}

s_no_extra_traits! {
Expand Down
10 changes: 10 additions & 0 deletions src/unix/bsd/apple/b64/x86_64/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
pub type boolean_t = ::c_uint;
pub type mcontext_t = *mut __darwin_mcontext64;

s! {
pub struct ucontext_t {
pub uc_onstack: ::c_int,
pub uc_sigmask: ::sigset_t,
pub uc_stack: ::stack_t,
pub uc_link: *mut ::ucontext_t,
pub uc_mcsize: usize,
pub uc_mcontext: mcontext_t,
}

pub struct __darwin_mcontext64 {
pub __es: __darwin_x86_exception_state64,
pub __ss: __darwin_x86_thread_state64,
Expand Down

0 comments on commit ee84dae

Please sign in to comment.