with_new_current_task

Function with_new_current_task 

Source
pub fn with_new_current_task<F, R>(
    locked: &mut Locked<Unlocked>,
    system_task: &WeakRef<Task>,
    task_name: String,
    f: F,
) -> Result<R, Errno>
where F: FnOnce(&mut Locked<Unlocked>, &CurrentTask) -> R,
Expand description

Create a new system task, register it on the thread and run the given closure with it.