forked from AbleOS/ableos
Cleaning of interrupt lookup after process end
This commit is contained in:
parent
4b9107c4d6
commit
a658189efe
|
@ -100,6 +100,14 @@ impl Executor {
|
||||||
|
|
||||||
if let Poll::Ready(()) = task.poll(&mut cx) {
|
if let Poll::Ready(()) = task.poll(&mut cx) {
|
||||||
self.tasks.remove(id);
|
self.tasks.remove(id);
|
||||||
|
self.interrupt_lookup.map(move |pid|{
|
||||||
|
if let Some(pid) = pid{
|
||||||
|
if pid == id {
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return pid;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,7 @@ sleep := @use("../../../libraries/stn/src/sleep.hb")
|
||||||
log := @use("../../../libraries/stn/src/log.hb")
|
log := @use("../../../libraries/stn/src/log.hb")
|
||||||
|
|
||||||
main := fn(): int {
|
main := fn(): int {
|
||||||
loop {
|
|
||||||
log.info("BEFORE\0")
|
log.info("BEFORE\0")
|
||||||
sleep.sleep_until_interrupt(32)
|
sleep.sleep_until_interrupt(32)
|
||||||
log.info("AFTER\0")
|
log.info("AFTER\0")
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue