Refactor process table

This commit is contained in:
jellllly420
2024-10-27 14:47:39 +08:00
committed by Tate, Hongliang Tian
parent 91171c38ec
commit 6ece48c095
5 changed files with 43 additions and 23 deletions

View File

@ -130,7 +130,7 @@ impl DirOps for RootDirOps {
cached_children
.put_entry_if_not_found("meminfo", || MemInfoFileOps::new_inode(this_ptr.clone()));
for process in process_table::process_table().iter() {
for process in process_table::process_table_mut().iter() {
let pid = process.pid().to_string();
cached_children.put_entry_if_not_found(&pid, || {
PidDirOps::new_inode(process.clone(), this_ptr.clone())