Skip to main content

create_task

Function create_task 

Source
pub fn create_task(kernel: &Kernel, task_name: &str) -> AutoReleasableTask
Expand description

An old way of creating a task for testing

This way of creating a task has problems because the test isn’t actually run with that task being current, which means that functions that expect a CurrentTask to actually be mapped into memory can operate incorrectly.

Please use spawn_kernel_and_run instead. If there isn’t a variant of spawn_kernel_and_run for this use case, please consider adding one that follows the new pattern of actually running the test on the spawned task.