diff --git a/kernel/src/task.rs b/kernel/src/task.rs index 9aa67f8..7cf5c10 100644 --- a/kernel/src/task.rs +++ b/kernel/src/task.rs @@ -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; + }); } } } diff --git a/sysdata/programs/timer_test/src/main.hb b/sysdata/programs/timer_test/src/main.hb index d359f3c..b2142ea 100644 --- a/sysdata/programs/timer_test/src/main.hb +++ b/sysdata/programs/timer_test/src/main.hb @@ -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") +} \ No newline at end of file