MCPcopy Create free account
hub / github.com/Starry-OS/StarryOS / get_task

Function get_task

core/src/task.rs:395–400  ·  view source on GitHub ↗

Finds the task with the given TID.

(tid: Pid)

Source from the content-addressed store, hash-verified

393
394/// Finds the task with the given TID.
395pub fn get_task(tid: Pid) -> AxResult<AxTaskRef> {
396 if tid == 0 {
397 return Ok(current().clone());
398 }
399 TASK_TABLE.read().get(&tid).ok_or(AxError::NoSuchProcess)
400}
401
402/// Lists all processes.
403pub fn processes() -> Vec<Arc<ProcessData>> {

Callers 6

send_signal_to_threadFunction · 0.85
send_signal_to_processFunction · 0.85
raise_signal_fatalFunction · 0.85
lookup_childMethod · 0.85
sys_getrusageFunction · 0.85
sys_get_robust_listFunction · 0.85

Calls 2

getMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected