/// Creates a `Kernel` and `Task` for testing purposes.
///
/// The `Task` is backed by a real process, and can be used to test syscalls.
Creates a `Kernel` and `Task` for testing purposes.
The `Task` is backed by a real process, and can be used to test syscalls.
Creates a ` Kernel ` and ` Task ` for testing purposes . The ` Task ` is backed by a real process and can be used to test syscalls .
pub fn create_kernel_and_task_with_fs(fs: Arc<FsContext>) -> (Arc<Kernel>, CurrentTask) {
    let kernel = Arc::new(
        Kernel::new(&CString::new("test-kernel").unwrap()).expect("failed to create kernel"),
    );
    let task = Task::create_process_without_parent(&kernel, CString::new("test-task").unwrap(), fs)
        .expect("failed to create first task");
    *task.exit_code.lock() = Some(0);
    (kernel, task)
}
pub fn create_kernel_and_task_with_fs ( fs : Arc < FsContext > ) -> ( Arc < Kernel > , CurrentTask ) { let kernel = Arc :: new ( Kernel :: new ( & CString :: new ( " " ) . unwrap ( ) ) . expect ( " " ) , ) ; let task = Task :: create_process_without_parent ( & kernel , CString :: new ( " " ) . unwrap ( ) , fs ) . expect ( " " ) ; * task . exit_code . lock ( ) = Some ( 0 ) ; ( kernel , task ) }
Creates a `Kernel` and `Task` for testing purposes.
Creates a ` Kernel ` and ` Task ` for testing purposes .
fs
Arc<FsContext>