Skip to content

Commit

Permalink
linux/musl: Add support for LoongArch64
Browse files Browse the repository at this point in the history
  • Loading branch information
heiher committed Mar 1, 2024
1 parent 947a185 commit 899e016
Show file tree
Hide file tree
Showing 4 changed files with 714 additions and 1 deletion.
40 changes: 40 additions & 0 deletions src/unix/linux_like/linux/musl/b64/loongarch64/align.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
s_no_extra_traits! {
#[allow(missing_debug_implementations)]
#[repr(align(16))]
pub struct max_align_t {
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 __pc: ::c_ulonglong,
pub __gregs: [::c_ulonglong; 32],
pub __flags: ::c_uint,
pub __extcontext: [::c_ulonglong; 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,
}
}

0 comments on commit 899e016

Please sign in to comment.