spawn_kernel_and_run_with_pkgfs

Function spawn_kernel_and_run_with_pkgfs 

Source
pub fn spawn_kernel_and_run_with_pkgfs<F, R>(
    callback: F,
) -> impl Future<Output = R>
where F: AsyncFnOnce(&mut Locked<Unlocked>, &mut CurrentTask) -> R + Send + Sync + 'static, R: Send + Sync + 'static,
Expand description

Create a Kernel object and run the given callback in the init process for that kernel. The task is rooted in a pkgfs instance.

This function is useful if you want to test code that requires a CurrentTask because your callback is called with the init process as the CurrentTask.