(args: SchedSetschedulerArgs, vm: &VirtualMachine)
| 2859 | #[cfg(not(target_env = "musl"))] |
| 2860 | #[pyfunction] |
| 2861 | fn sched_setscheduler(args: SchedSetschedulerArgs, vm: &VirtualMachine) -> PyResult<i32> { |
| 2862 | let libc_sched_param = convert_sched_param(&args.sched_param, vm)?; |
| 2863 | let policy = unsafe { libc::sched_setscheduler(args.pid, args.policy, &libc_sched_param) }; |
| 2864 | if policy == -1 { |
| 2865 | Err(vm.new_last_errno_error()) |
| 2866 | } else { |
| 2867 | Ok(policy) |
| 2868 | } |
| 2869 | } |
| 2870 | |
| 2871 | #[pyfunction] |
| 2872 | fn sched_getparam(pid: libc::pid_t, vm: &VirtualMachine) -> PyResult<PyTupleRef> { |
nothing calls this directly
no test coverage detected