From d70b9e4fff5f02a7600ae91a6bc52d2d56146e97 Mon Sep 17 00:00:00 2001 From: Victor Polevoy Date: Sat, 26 Mar 2022 13:30:22 +0100 Subject: [PATCH] Expose more pthread bindings for BSD-like OSes. --- src/unix/bsd/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs index 8ebca0930107a..5d5f37d287a2f 100644 --- a/src/unix/bsd/mod.rs +++ b/src/unix/bsd/mod.rs @@ -816,6 +816,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; pub fn acct(filename: *const ::c_char) -> ::c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"),