From 73cd54a1f5fbdefbafff9227f5d00feb86b4199e Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 11 Oct 2025 13:40:09 -0400 Subject: kern: proc: Add process lookups by PID Signed-off-by: Ian Moffett --- src/sys/include/sys/proc.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/sys/include') diff --git a/src/sys/include/sys/proc.h b/src/sys/include/sys/proc.h index 48c784a..0cf105e 100644 --- a/src/sys/include/sys/proc.h +++ b/src/sys/include/sys/proc.h @@ -202,6 +202,15 @@ int md_set_ip(struct proc *procp, uintptr_t ip); */ int proc_check_addr(struct proc *proc, uintptr_t addr, size_t len); +/* + * Lookup a process using its PID + * + * @pid: PID of process to lookup + * + * Returns NULL on failure + */ +struct proc *proc_lookup(pid_t pid); + /* * Put the current process into a halt loop * until the next one runs. -- cgit v1.2.3