Converting pids into a new type ContextId
Keeping pid (and file descriptor, and scheme id, ...) as usize is a footgun. Let's remove it.
This commit is contained in:
parent
d16515ea12
commit
37a34ab7f7
10 changed files with 52 additions and 44 deletions
|
@ -83,8 +83,8 @@ pub fn resource() -> Result<Vec<u8>> {
|
|||
let name = str::from_utf8(&name_bytes).unwrap_or("");
|
||||
|
||||
string.push_str(&format!("{:<6}{:<6}{:<6}{:<6}{:<6}{:<6}{:<8}{}\n",
|
||||
context.id,
|
||||
context.ppid,
|
||||
context.id.into(),
|
||||
context.ppid.into(),
|
||||
context.euid,
|
||||
context.egid,
|
||||
stat_string,
|
||||
|
|
|
@ -53,7 +53,7 @@ impl UserInner {
|
|||
|
||||
self.call_inner(Packet {
|
||||
id: self.next_id.fetch_add(1, Ordering::SeqCst),
|
||||
pid: pid,
|
||||
pid: pid.into(),
|
||||
uid: uid,
|
||||
gid: gid,
|
||||
a: a,
|
||||
|
@ -297,7 +297,7 @@ impl Scheme for UserScheme {
|
|||
|
||||
inner.call_inner(Packet {
|
||||
id: id,
|
||||
pid: pid,
|
||||
pid: pid.into(),
|
||||
uid: uid,
|
||||
gid: gid,
|
||||
a: SYS_FMAP,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue