Function nc::ioprio_set

source ·
pub unsafe fn ioprio_set(which: i32, who: i32, ioprio: i32) -> Result<(), Errno>
Expand description

Set I/O scheduling class and priority.

See ioprio

§Example

// Change priority to lowest.
let new_prio_data = 7;
let new_prio = unsafe { nc::ioprio_prio_value(nc::IOPRIO_CLASS_IDLE, new_prio_data) };
let ret = unsafe { nc::ioprio_set(nc::IOPRIO_WHO_PROCESS, 0, new_prio) };
assert!(ret.is_ok());