Skip to content

Commit e92b4fb

Browse files
committed
Auto merge of #2993 - zhaixiaojuan:LA-add-ucontext-clone_args, r=JohnTitor
Add ucontext and clone_args for loongarch64
2 parents c206b79 + 7066c3c commit e92b4fb

File tree

1 file changed

+33
-0
lines changed
  • src/unix/linux_like/linux/gnu/b64/loongarch64

1 file changed

+33
-0
lines changed

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,36 @@ s_no_extra_traits! {
55
priv_: [f64; 4]
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 sc_pc: ::c_ulonglong,
21+
pub sc_regs: [::c_ulonglong; 32],
22+
pub sc_flags: ::c_ulong,
23+
pub sc_extcontext: [u64; 0],
24+
}
25+
26+
#[repr(align(8))]
27+
pub struct clone_args {
28+
pub flags: ::c_ulonglong,
29+
pub pidfd: ::c_ulonglong,
30+
pub child_tid: ::c_ulonglong,
31+
pub parent_tid: ::c_ulonglong,
32+
pub exit_signal: ::c_ulonglong,
33+
pub stack: ::c_ulonglong,
34+
pub stack_size: ::c_ulonglong,
35+
pub tls: ::c_ulonglong,
36+
pub set_tid: ::c_ulonglong,
37+
pub set_tid_size: ::c_ulonglong,
38+
pub cgroup: ::c_ulonglong,
39+
}
40+
}

0 commit comments

Comments
 (0)