allow a process to identify itself

this makes debugging code a lot more ergonomic. I don't think
this impacts security...
This commit is contained in:
bunnie 2024-05-21 01:07:59 +08:00
parent 853f9d3cd3
commit d7a8671e7e

View file

@ -543,6 +543,11 @@ impl Process {
}
None
}
/// This is used by debugging routines to sanity check state, which are typically #[cfg]'d out
/// but with complicated overlapping rules that constantly change. Hence, the #[allow(dead_code)].
#[allow(dead_code)]
pub fn pid(&self) -> PID { self.pid }
}
impl Thread {