From 0d59c8d11173b28f958413128eb792655568a365 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Thu, 14 Apr 2022 12:36:34 +0200 Subject: kernel: store a pointer to the callback function in .waits4irq removes `proc.c`'s pointless dependency on `vfs/root.h` --- src/kernel/proc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/kernel/proc.c') diff --git a/src/kernel/proc.c b/src/kernel/proc.c index 2c4cc5c..e97d5cf 100644 --- a/src/kernel/proc.c +++ b/src/kernel/proc.c @@ -6,7 +6,6 @@ #include #include #include -#include // TODO struct process *process_first; struct process *process_current; @@ -108,7 +107,7 @@ _Noreturn void process_idle(void) { if (procs[i]->waits4irq.ready()) { /* if this is entered during the first iteration, it indicates a * kernel bug. this should be logged. TODO? */ - vfs_root_handler(&procs[i]->waits4irq.req); // TODO this should be a function pointer too + procs[i]->waits4irq.callback(procs[i]); process_switch_any(); } } -- cgit v1.2.3