summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2017-06-15 15:51:19 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2017-06-15 15:51:19 +0000
commitab5435e8bc9b10ed3dc05787c10d28bb8957a42a (patch)
treebac695c2898deaa067e90200d1d6b59a4235c86a /src
parent06850b29100ac94a90b6d1ee736f2097235379b6 (diff)
parentd50f569c32238f81c4aa3ee0ec0191c11bfcfe6e (diff)
downloadnix-ab5435e8bc9b10ed3dc05787c10d28bb8957a42a.zip
Merge #600
600: Change sched_setaffinity's PID argument to pid_t r=asomers I might be missing something as to why this argument was made `isize`, but there's nothing obvious from the commit history, and other calls that work with thread IDs in this library return `pid_t`, so hopefully this is a nit and not noise.
Diffstat (limited to 'src')
-rw-r--r--src/sched.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sched.rs b/src/sched.rs
index dee3107e..eefd29b2 100644
--- a/src/sched.rs
+++ b/src/sched.rs
@@ -91,9 +91,9 @@ mod ffi {
}
}
-pub fn sched_setaffinity(pid: isize, cpuset: &CpuSet) -> Result<()> {
+pub fn sched_setaffinity(pid: pid_t, cpuset: &CpuSet) -> Result<()> {
let res = unsafe {
- libc::sched_setaffinity(pid as libc::pid_t,
+ libc::sched_setaffinity(pid,
mem::size_of::<CpuSet>() as libc::size_t,
mem::transmute(cpuset))
};