Use status helpers

This commit is contained in:
Wildan M
2026-04-29 11:20:43 +07:00
parent baf329c120
commit fd5a04a121
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1240,7 +1240,7 @@ impl ContextHandle {
} else {
let mut ctxt = context.write(token.token());
//trace!("FORCEKILL NONSELF={} {}, SELF={}", ctxt.debug_id, ctxt.pid, context::current().read().debug_id);
if let context::Status::Dead { .. } = ctxt.status {
if ctxt.status.is_dead() {
return Ok(size_of::<usize>());
}
ctxt.status = context::Status::Runnable;
+2 -2
View File
@@ -86,9 +86,9 @@ fn get_contexts_stats(token: &mut CleanLockToken) -> (u64, u64) {
};
for status in statuses {
if matches!(status, Status::Runnable) {
if status.is_runnable() {
running += 1;
} else if !matches!(status, Status::Dead { .. }) {
} else if !status.is_dead() {
blocked += 1;
}
}