Cleaning of interrupt lookup after process end

This commit is contained in:
Talha Qamar 2024-11-27 02:29:43 +05:00
parent 4b9107c4d6
commit a658189efe
2 changed files with 12 additions and 6 deletions

View file

@ -100,6 +100,14 @@ impl Executor {
if let Poll::Ready(()) = task.poll(&mut cx) {
self.tasks.remove(id);
self.interrupt_lookup.map(move |pid|{
if let Some(pid) = pid{
if pid == id {
return None;
}
}
return pid;
});
}
}
}

View file

@ -2,9 +2,7 @@ sleep := @use("../../../libraries/stn/src/sleep.hb")
log := @use("../../../libraries/stn/src/log.hb")
main := fn(): int {
loop {
log.info("BEFORE\0")
sleep.sleep_until_interrupt(32)
log.info("AFTER\0")
}
}
log.info("BEFORE\0")
sleep.sleep_until_interrupt(32)
log.info("AFTER\0")
}