MCPcopy Create free account
hub / github.com/asterinas/vostd / current_task

Function current_task

ostd/src/task/processor.rs:22–24  ·  view source on GitHub ↗

Returns a pointer to the current task running on the processor. It returns `None` if the function is called in the bootstrap context.

()

Source from the content-addressed store, hash-verified

20///
21/// It returns `None` if the function is called in the bootstrap context.
22pub(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///

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
loadMethod · 0.45

Tested by

no test coverage detected