Fix dead contexts clobber idle pools
This commit is contained in:
@@ -60,6 +60,9 @@ impl Status {
|
||||
pub fn is_soft_blocked(&self) -> bool {
|
||||
matches!(self, Self::Blocked)
|
||||
}
|
||||
pub fn is_dead(&self) -> bool {
|
||||
matches!(self, Self::Dead { .. })
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
|
||||
@@ -336,6 +336,9 @@ fn wakeup_contexts(token: &mut CleanLockToken, switch_time: u128) -> Vec<(usize,
|
||||
continue;
|
||||
}
|
||||
}
|
||||
} else if guard.status.is_dead() {
|
||||
// TODO: who hold this dead context?
|
||||
continue;
|
||||
}
|
||||
|
||||
if guard.status.is_runnable() && !guard.running {
|
||||
|
||||
Reference in New Issue
Block a user