⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

current_process

Function current_process 

Source
pub fn current_process() -> &'static mut TaskProcessAdapter
Expand description

Get the current process

Returns a static mutable reference to a TaskProcessAdapter wrapper around the currently scheduled task. If no task is running, returns a dummy adapter.

This function reuses a cached heap allocation to avoid allocating a new Box<TaskProcessAdapter> on every call. The first call allocates; subsequent calls update the existing allocation in-place.