Returns a pointer to the current task running on the processor. It returns `None` if the function is called in the bootstrap context.
()
| 20 | /// |
| 21 | /// It returns `None` if the function is called in the bootstrap context. |
| 22 | pub(super) fn current_task() -> Option<NonNull<Task>> { |
| 23 | NonNull::new(CURRENT_TASK_PTR.load().cast_mut()) |
| 24 | } |
| 25 | |
| 26 | /// Calls this function to switch to other task |
| 27 | /// |