summaryrefslogtreecommitdiff
path: root/src/sched.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sched.rs')
-rw-r--r--src/sched.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/sched.rs b/src/sched.rs
index aa09b316..4b6c955f 100644
--- a/src/sched.rs
+++ b/src/sched.rs
@@ -1,7 +1,7 @@
use std::mem;
use libc::{c_int, c_uint, c_void, c_ulong};
use errno::Errno;
-use {NixResult, NixError};
+use {Result, Error};
pub type CloneFlags = c_uint;
@@ -143,7 +143,7 @@ mod ffi {
}
}
-pub fn sched_setaffinity(pid: isize, cpuset: &CpuSet) -> NixResult<()> {
+pub fn sched_setaffinity(pid: isize, cpuset: &CpuSet) -> Result<()> {
use libc::{pid_t, size_t};
let res = unsafe {
@@ -151,13 +151,13 @@ pub fn sched_setaffinity(pid: isize, cpuset: &CpuSet) -> NixResult<()> {
};
if res != 0 {
- Err(NixError::Sys(Errno::last()))
+ Err(Error::Sys(Errno::last()))
} else {
Ok(())
}
}
-pub fn clone(mut cb: CloneCb, stack: &mut [u8], flags: CloneFlags) -> NixResult<()> {
+pub fn clone(mut cb: CloneCb, stack: &mut [u8], flags: CloneFlags) -> Result<()> {
extern "C" fn callback(data: *mut CloneCb) -> c_int {
let cb: &mut CloneCb = unsafe { &mut *data };
(*cb)() as c_int
@@ -169,17 +169,17 @@ pub fn clone(mut cb: CloneCb, stack: &mut [u8], flags: CloneFlags) -> NixResult<
};
if res != 0 {
- return Err(NixError::Sys(Errno::last()));
+ return Err(Error::Sys(Errno::last()));
}
Ok(())
}
-pub fn unshare(flags: CloneFlags) -> NixResult<()> {
+pub fn unshare(flags: CloneFlags) -> Result<()> {
let res = unsafe { ffi::unshare(flags) };
if res != 0 {
- return Err(NixError::Sys(Errno::last()));
+ return Err(Error::Sys(Errno::last()));
}
Ok(())