diff options
author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-07-03 11:25:35 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-03 11:25:35 +0900 |
commit | 7a507b64c26f6b32c0c7a638a2306e8a41e3e9d8 (patch) | |
tree | 7312ec29f988eff9bbd49644fcc5cb627eef99ab | |
parent | fdc5cf4a1ba362aec989bd3dc7ec88bcd371a23a (diff) | |
parent | 8059eda19d9e67dc411a90ac8c6481f5c9107c4a (diff) | |
download | rust-libc-7a507b64c26f6b32c0c7a638a2306e8a41e3e9d8.tar.gz |
Merge pull request #1806 from alexcrichton/aarch64-mcontet
Add ucontext_t/mcontext_t for aarch64 Android
-rw-r--r-- | src/unix/linux_like/android/b64/aarch64/align.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/unix/linux_like/android/b64/aarch64/align.rs b/src/unix/linux_like/android/b64/aarch64/align.rs index 8e949963a6..154c2c54ce 100644 --- a/src/unix/linux_like/android/b64/aarch64/align.rs +++ b/src/unix/linux_like/android/b64/aarch64/align.rs @@ -5,3 +5,25 @@ s_no_extra_traits! { priv_: [f32; 8] } } + +s! { + pub struct ucontext_t { + pub uc_flags: ::c_ulong, + pub uc_link: *mut ucontext_t, + pub uc_stack: ::stack_t, + pub uc_sigmask: ::sigset_t, + pub uc_mcontext: mcontext_t, + } + + #[repr(align(16))] + pub struct mcontext_t { + pub fault_address: ::c_ulonglong, + pub regs: [::c_ulonglong; 31], + pub sp: ::c_ulonglong, + pub pc: ::c_ulonglong, + pub pstate: ::c_ulonglong, + // nested arrays to get the right size/length while being able to + // auto-derive traits like Debug + __reserved: [[u64; 32]; 16], + } +} |