Skip to content

Commit 0cd65a9

Browse files
committed
openbsd riscv64 adding sigcontext
1 parent 1bca87e commit 0cd65a9

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/unix/bsd/netbsdlike/openbsd/riscv64.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
pub type c_long = i64;
22
pub type c_ulong = u64;
33
pub type c_char = u8;
4+
pub type ucontext_t = sigcontext;
5+
6+
s! {
7+
pub struct sigcontext {
8+
__sc_unused: ::c_int,
9+
pub sc_mask: ::c_int,
10+
pub sc_ra: ::c_long,
11+
pub sc_sp: ::c_long,
12+
pub sc_gp: ::c_long,
13+
pub sc_tp: ::c_long,
14+
pub sc_t: [::c_long; 7],
15+
pub sc_s: [::c_long; 12],
16+
pub sc_a: [::c_long; 8],
17+
pub sc_sepc: ::c_long,
18+
pub sc_f: [::c_long; 32],
19+
pub sc_fcsr: ::c_long,
20+
pub sc_cookie: ::c_long,
21+
}
22+
}
423

524
// should be pub(crate), but that requires Rust 1.18.0
625
cfg_if! {

0 commit comments

Comments
 (0)