Skip to content

Commit 251dcf5

Browse files
committed
Auto merge of #2430 - devnexen:musl_ucontextapi, r=Amanieu
linux musl bring ucontext api for related archs
2 parents d0ebfae + 460dd58 commit 251dcf5

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

+4
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

+4
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)