Skip to content

Commit 505bef7

Browse files
author
Victor Polevoy
committed
Add schedule params & priority pthread functions
1 parent 5e208ed commit 505bef7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/unix/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,14 @@ extern {
598598
parent: Option<unsafe extern fn()>,
599599
child: Option<unsafe extern fn()>) -> ::c_int;
600600
pub fn pthread_exit(value: *mut ::c_void);
601+
pub fn pthread_getschedparam(native: ::pthread_t,
602+
policy: *mut ::c_int,
603+
param: *mut ::sched_param) -> ::c_int;
604+
pub fn pthread_setschedparam(native: ::pthread_t,
605+
policy: ::c_int,
606+
param: *const ::sched_param) -> ::c_int;
607+
pub fn pthread_setschedprio(native: ::pthread_t,
608+
priority: ::c_int) -> ::c_int;
601609
pub fn pthread_attr_init(attr: *mut ::pthread_attr_t) -> ::c_int;
602610
pub fn pthread_attr_destroy(attr: *mut ::pthread_attr_t) -> ::c_int;
603611
pub fn pthread_attr_setstacksize(attr: *mut ::pthread_attr_t,

0 commit comments

Comments
 (0)