Skip to content
Snippets Groups Projects
Commit 0b3635fd authored by Peter Jin's avatar Peter Jin
Browse files

linux: Support getting and setting the cpu affinity for the current

pthread.
parent e8869370
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