Auto merge of #298 - peterhj:peterhj-pthread-affinity, r=alexcrichton
linux: Support getting and setting the cpu affinity for the current pthread. This implements `pthread_getaffinity_np` and `pthread_setaffinity_np` for linux.
This commit is contained in:
commit
e0202b84e7
@ -495,6 +495,12 @@ extern {
|
||||
pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
|
||||
cpusetsize: ::size_t,
|
||||
cpuset: *const ::cpu_set_t) -> ::c_int;
|
||||
pub fn pthread_getaffinity_np(thread: ::pthread_t,
|
||||
cpusetsize: ::size_t,
|
||||
cpuset: *mut ::cpu_set_t) -> ::c_int;
|
||||
pub fn pthread_setaffinity_np(thread: ::pthread_t,
|
||||
cpusetsize: ::size_t,
|
||||
cpuset: *const ::cpu_set_t) -> ::c_int;
|
||||
}
|
||||
|
||||
cfg_if! {
|
||||
|
Loading…
Reference in New Issue
Block a user