Skip to content

Commit

Permalink
Auto merge of #2430 - devnexen:musl_ucontextapi, r=Amanieu
Browse files Browse the repository at this point in the history
linux musl bring ucontext api for related archs
  • Loading branch information
bors committed Oct 6, 2021
2 parents 3e328bd + e7601c6 commit fbd963d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/unix/linux_like/linux/musl/b32/x86/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,10 @@ pub const SS: ::c_int = 16;

extern "C" {
pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t;
pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
pub fn makecontext(ucp: *mut ucontext_t, func: extern "C" fn(), argc: ::c_int, ...);
pub fn swapcontext(uocp: *mut ucontext_t, ucp: *const ucontext_t) -> ::c_int;
}

cfg_if! {
Expand Down
4 changes: 4 additions & 0 deletions src/unix/linux_like/linux/musl/b64/aarch64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,10 @@ pub const TIOCM_RI: ::c_int = TIOCM_RNG;

extern "C" {
pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
pub fn makecontext(ucp: *mut ucontext_t, func: extern "C" fn(), argc: ::c_int, ...);
pub fn swapcontext(uocp: *mut ucontext_t, ucp: *const ucontext_t) -> ::c_int;
}

cfg_if! {
Expand Down
4 changes: 4 additions & 0 deletions src/unix/linux_like/linux/musl/b64/x86_64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,10 @@ pub const TIOCM_RI: ::c_int = TIOCM_RNG;

extern "C" {
pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
pub fn makecontext(ucp: *mut ucontext_t, func: extern "C" fn(), argc: ::c_int, ...);
pub fn swapcontext(uocp: *mut ucontext_t, ucp: *const ucontext_t) -> ::c_int;
}

cfg_if! {
Expand Down

0 comments on commit fbd963d

Please sign in to comment.