Skip to content
Snippets Groups Projects
Commit e0202b84 authored by bors's avatar bors
Browse files

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.
parents e8869370 0b3635fd
No related branches found
No related tags found
No related merge requests found
......@@ -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! {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment