exit now marks all threads as exited

This commit is contained in:
pjht 2024-11-28 09:37:13 -06:00
parent 5f1274dd39
commit e469ad705a
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E

View File

@ -405,8 +405,10 @@ impl Tasking {
self.wfi_loop.store(false, Ordering::Relaxed);
#[warn(clippy::indexing_slicing, reason = "FIXME(?)")]
if self.current_pid.read().is_some() {
self.current_thread(|process| {
*process.sleeping.write() = Some(SleepReason::Exited);
self.current_process(|process| {
for (_, thread) in &*process.threads().read() {
*thread.sleeping.write() = Some(SleepReason::Exited);
}
});
}
*self.current_pid.write() = Some(next_process_pid);