diff options
author | bors <bors@rust-lang.org> | 2016-06-01 23:22:37 -0700 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2016-06-01 23:22:37 -0700 |
commit | eb637d277356fc4e328ba682e38f52ec6d9f8238 (patch) | |
tree | 6c57860d94a797a7f55c851948e8b89789010c29 | |
parent | 45d85899e99d33e291b2bf3259881b46cc5365d7 (diff) | |
parent | ae664ff911cff82bf19240a69a2fbcd1a6d83ae7 (diff) | |
download | rust-libc-eb637d277356fc4e328ba682e38f52ec6d9f8238.tar.gz |
Auto merge of #299 - lemonrock:sched_getcpu, r=alexcrichton
Adding sched_getcpu() for Android and Linux
None
-rw-r--r-- | src/unix/notbsd/android/mod.rs | 1 | ||||
-rw-r--r-- | src/unix/notbsd/linux/other/mod.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/unix/notbsd/android/mod.rs b/src/unix/notbsd/android/mod.rs index f5ad64b909..39059a6559 100644 --- a/src/unix/notbsd/android/mod.rs +++ b/src/unix/notbsd/android/mod.rs @@ -560,6 +560,7 @@ extern { pub fn __sched_cpualloc(count: ::size_t) -> *mut ::cpu_set_t; pub fn __sched_cpufree(set: *mut ::cpu_set_t); pub fn __sched_cpucount(setsize: ::size_t, set: *mut cpu_set_t) -> ::c_int; + pub fn sched_getcpu() -> ::c_int; } cfg_if! { diff --git a/src/unix/notbsd/linux/other/mod.rs b/src/unix/notbsd/linux/other/mod.rs index a6bacabe5f..a9cb0ad6f0 100644 --- a/src/unix/notbsd/linux/other/mod.rs +++ b/src/unix/notbsd/linux/other/mod.rs @@ -506,6 +506,7 @@ extern { pub fn pthread_setaffinity_np(thread: ::pthread_t, cpusetsize: ::size_t, cpuset: *const ::cpu_set_t) -> ::c_int; + pub fn sched_getcpu() -> ::c_int; } cfg_if! { |