summaryrefslogtreecommitdiff
path: root/src/kernel/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/proc.c')
-rw-r--r--src/kernel/proc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/kernel/proc.c b/src/kernel/proc.c
index 1084f48..4164874 100644
--- a/src/kernel/proc.c
+++ b/src/kernel/proc.c
@@ -394,8 +394,15 @@ void proc_tryreap(Proc *dead) {
}
}
+void proc_tryintr(Proc *p) {
+ if (p->state == PS_WAITS4TIMER) {
+ timer_deschedule(p);
+ }
+}
+
void proc_intr(Proc *p) {
if (!p->intr_fn) return;
+ proc_tryintr(p);
/* save old rsp,rip */
struct intr_data d;