axhal::cpu

Function current_task_ptr

Source
pub fn current_task_ptr<T>() -> *const T
Expand description

Gets the pointer to the current task with preemption-safety.

Preemption may be enabled when calling this function. This function will guarantee the correctness even the current task is preempted.