Skip to content

Commit eef23c7

Browse files
committed
Change to more standard priority function interfaces
1 parent 435f7c3 commit eef23c7

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/unix/newlib/horizon/mod.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ s! {
5151
pub sun_family: ::sa_family_t,
5252
pub sun_path: [::c_char; 104usize],
5353
}
54+
55+
pub struct sched_param {
56+
pub sched_priority: ::c_int,
57+
}
5458
}
5559

5660
pub const SIGEV_NONE: ::c_int = 1;
@@ -190,7 +194,15 @@ extern "C" {
190194
value: *mut ::c_void,
191195
) -> ::c_int;
192196

193-
pub fn pthread_attr_setpriority(attr: *mut ::pthread_attr_t, priority: ::c_int) -> ::c_int;
197+
pub fn pthread_attr_getschedparam(
198+
attr: *const ::pthread_attr_t,
199+
param: *mut sched_param,
200+
) -> ::c_int;
201+
202+
pub fn pthread_attr_setschedparam(
203+
attr: *mut ::pthread_attr_t,
204+
param: *const sched_param,
205+
) -> ::c_int;
194206

195207
pub fn pthread_attr_setaffinity(attr: *mut ::pthread_attr_t, affinity: ::c_int) -> ::c_int;
196208

0 commit comments

Comments
 (0)