From 69fd0dd9fda47aa52cccdbef6ca388cea38e693b Mon Sep 17 00:00:00 2001 From: dzwdz Date: Thu, 25 Jul 2024 22:17:27 +0200 Subject: kernel: pass more information to user on interrupt This is meant to facilitate a syscall for returning from interrupts, which will actually work in the general case as opposed to the current hack, which only works if the interrupt occured during a syscall (which is correct... for now). --- src/libc/intr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/libc/intr.c') diff --git a/src/libc/intr.c b/src/libc/intr.c index cdefc2f..c44a90e 100644 --- a/src/libc/intr.c +++ b/src/libc/intr.c @@ -1,13 +1,14 @@ #include +#include #include -static void intr_null(void) { } +static void intr_null(struct intr_data *) { } -extern void (*volatile _intr)(void); -void intr_set(void (*fn)(void)) { +extern void (*volatile _intr)(struct intr_data *); +void intr_set(void (*fn)(struct intr_data *)) { _intr = fn ? fn : intr_null; } -void intr_default(void) { +void intr_default(struct intr_data *intr) { exit(-1); } -- cgit v1.2.3