diff options
author | AzureMarker <mark.drobnak@gmail.com> | 2022-02-11 21:23:57 -0800 |
---|---|---|
committer | Mark Drobnak <mark.drobnak@gmail.com> | 2022-03-06 12:31:05 -0800 |
commit | eef23c7017332352afd02bfaaed8a0576830a9f7 (patch) | |
tree | 1db11bb08071c8e9bb44d626d85f0b9dbb4d6f05 | |
parent | 435f7c3374284d1f5b2e3f1f728e77225a48ec81 (diff) | |
download | rust-libc-eef23c7017332352afd02bfaaed8a0576830a9f7.tar.gz |
Change to more standard priority function interfaces
-rw-r--r-- | src/unix/newlib/horizon/mod.rs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/unix/newlib/horizon/mod.rs b/src/unix/newlib/horizon/mod.rs index e638734db5..56d35b1af1 100644 --- a/src/unix/newlib/horizon/mod.rs +++ b/src/unix/newlib/horizon/mod.rs @@ -51,6 +51,10 @@ s! { pub sun_family: ::sa_family_t, pub sun_path: [::c_char; 104usize], } + + pub struct sched_param { + pub sched_priority: ::c_int, + } } pub const SIGEV_NONE: ::c_int = 1; @@ -190,7 +194,15 @@ extern "C" { value: *mut ::c_void, ) -> ::c_int; - pub fn pthread_attr_setpriority(attr: *mut ::pthread_attr_t, priority: ::c_int) -> ::c_int; + pub fn pthread_attr_getschedparam( + attr: *const ::pthread_attr_t, + param: *mut sched_param, + ) -> ::c_int; + + pub fn pthread_attr_setschedparam( + attr: *mut ::pthread_attr_t, + param: *const sched_param, + ) -> ::c_int; pub fn pthread_attr_setaffinity(attr: *mut ::pthread_attr_t, affinity: ::c_int) -> ::c_int; |