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

@ -69,7 +69,7 @@ fn get_processes(prio_target: PriorityTarget) -> Result<Vec<Arc<Process>>> {
}
PriorityTarget::User(uid) => {
// Get the processes that are running under the specified user
let processes: Vec<Arc<Process>> = process_table::process_table()
let processes: Vec<Arc<Process>> = process_table::process_table_mut()
.iter()
.filter(|process| {
let Some(main_thread) = process.main_thread() else {