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

Function get_process_data

core/src/task.rs:408–413  ·  view source on GitHub ↗

Finds the process with the given PID.

(pid: Pid)

Source from the content-addressed store, hash-verified

406
407/// Finds the process with the given PID.
408pub fn get_process_data(pid: Pid) -> AxResult<Arc<ProcessData>> {
409 if pid == 0 {
410 return Ok(current().as_thread().proc_data.clone());
411 }
412 PROCESS_TABLE.read().get(&pid).ok_or(AxError::NoSuchProcess)
413}
414
415/// Finds the process group with the given PGID.
416pub fn get_process_group(pgid: Pid) -> AxResult<Arc<ProcessGroup>> {

Callers 9

send_signal_to_processFunction · 0.85
do_exitFunction · 0.85
sys_prlimit64Function · 0.85
sys_getsidFunction · 0.85
sys_getpgidFunction · 0.85
sys_setpgidFunction · 0.85
sys_getpriorityFunction · 0.85
validate_cap_headerFunction · 0.85
sys_pidfd_openFunction · 0.85

Calls 3

as_threadMethod · 0.80
getMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected