Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ucontext and clone_args for loongarch64 #2993

Merged
merged 1 commit into from Nov 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 33 additions & 0 deletions src/unix/linux_like/linux/gnu/b64/loongarch64/align.rs
Expand Up @@ -5,3 +5,36 @@ s_no_extra_traits! {
priv_: [f64; 4]
}
}

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 sc_pc: ::c_ulonglong,
pub sc_regs: [::c_ulonglong; 32],
pub sc_flags: ::c_ulong,
pub sc_extcontext: [u64; 0],
}

#[repr(align(8))]
pub struct clone_args {
pub flags: ::c_ulonglong,
pub pidfd: ::c_ulonglong,
pub child_tid: ::c_ulonglong,
pub parent_tid: ::c_ulonglong,
pub exit_signal: ::c_ulonglong,
pub stack: ::c_ulonglong,
pub stack_size: ::c_ulonglong,
pub tls: ::c_ulonglong,
pub set_tid: ::c_ulonglong,
pub set_tid_size: ::c_ulonglong,
pub cgroup: ::c_ulonglong,
}
}