Skip to content

Commit 460dd58

Browse files
committed
linux musl bring ucontext api for related archs
1 parent 2a80700 commit 460dd58

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/unix/linux_like/linux/musl/b64/aarch64/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,10 @@ pub const TIOCM_RI: ::c_int = TIOCM_RNG;
682682

683683
extern "C" {
684684
pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
685+
pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
686+
pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
687+
pub fn makecontext(ucp: *mut ucontext_t, func: extern "C" fn(), argc: ::c_int, ...);
688+
pub fn swapcontext(uocp: *mut ucontext_t, ucp: *const ucontext_t) -> ::c_int;
685689
}
686690

687691
cfg_if! {

src/unix/linux_like/linux/musl/b64/x86_64/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,10 @@ pub const TIOCM_RI: ::c_int = TIOCM_RNG;
950950

951951
extern "C" {
952952
pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
953+
pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
954+
pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
955+
pub fn makecontext(ucp: *mut ucontext_t, func: extern "C" fn(), argc: ::c_int, ...);
956+
pub fn swapcontext(uocp: *mut ucontext_t, ucp: *const ucontext_t) -> ::c_int;
953957
}
954958

955959
cfg_if! {

0 commit comments

Comments
 (0)