Finds the task with the given TID.
(tid: Pid)
| 393 | |
| 394 | /// Finds the task with the given TID. |
| 395 | pub 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. |
| 403 | pub fn processes() -> Vec<Arc<ProcessData>> { |
no test coverage detected