Skip to content

Commit

Permalink
Auto merge of #2764 - vityafx:add-more-posix-functions-for-emscripten…
Browse files Browse the repository at this point in the history
…, r=Amanieu

Add pthread_[s,g]etschedparam to emscripten.

Closes #2754

The functions are available in emscripten when built with the posix threads support.
  • Loading branch information
bors committed Apr 20, 2022
2 parents 40d529f + c79cb77 commit 108086c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/unix/linux_like/emscripten/mod.rs
Expand Up @@ -1879,6 +1879,16 @@ extern "C" {
f: extern "C" fn(*mut ::c_void) -> *mut ::c_void,
value: *mut ::c_void,
) -> ::c_int;
pub fn pthread_setschedparam(
native: ::pthread_t,
policy: ::c_int,
param: *const ::sched_param,
) -> ::c_int;
pub fn pthread_getschedparam(
native: ::pthread_t,
policy: *mut ::c_int,
param: *mut ::sched_param,
) -> ::c_int;
}

cfg_if! {
Expand Down

0 comments on commit 108086c

Please sign in to comment.