Skip to content

Commit 035a480

Browse files
authored
Merge pull request #1728 from alexcrichton/add-ucontext
Add definition of ucontext_t for aarch64-unknown-linux-gnu
2 parents d075426 + 17d5bc8 commit 035a480

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

src/unix/linux_like/linux/gnu/b64/aarch64/align.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,25 @@ s_no_extra_traits! {
55
priv_: [f32; 8]
66
}
77
}
8+
9+
s! {
10+
pub struct ucontext_t {
11+
pub uc_flags: ::c_ulong,
12+
pub uc_link: *mut ucontext_t,
13+
pub uc_stack: ::stack_t,
14+
pub uc_sigmask: ::sigset_t,
15+
pub uc_mcontext: mcontext_t,
16+
}
17+
18+
#[repr(align(16))]
19+
pub struct mcontext_t {
20+
pub fault_address: ::c_ulonglong,
21+
pub regs: [::c_ulonglong; 31],
22+
pub sp: ::c_ulonglong,
23+
pub pc: ::c_ulonglong,
24+
pub pstate: ::c_ulonglong,
25+
// nested arrays to get the right size/length while being able to
26+
// auto-derive traits like Debug
27+
__reserved: [[u64; 32]; 16],
28+
}
29+
}

src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ pub const MAP_POPULATE: ::c_int = 0x08000;
533533
pub const MAP_NONBLOCK: ::c_int = 0x010000;
534534
pub const MAP_STACK: ::c_int = 0x020000;
535535
pub const MAP_HUGETLB: ::c_int = 0x040000;
536-
pub const MAP_SYNC : ::c_int = 0x080000;
536+
pub const MAP_SYNC: ::c_int = 0x080000;
537537

538538
pub const EDEADLOCK: ::c_int = 35;
539539

0 commit comments

Comments
 (0)