diff options
author | dzwdz | 2024-07-25 22:17:27 +0200 |
---|---|---|
committer | dzwdz | 2024-07-25 22:17:27 +0200 |
commit | 69fd0dd9fda47aa52cccdbef6ca388cea38e693b (patch) | |
tree | 9e0e80e0380f2f39dea8f3a76ecb629918ff187a /src/libc/intr.c | |
parent | 24934406d5d39e013e22a9e6f4138c4169460d71 (diff) |
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).
Diffstat (limited to 'src/libc/intr.c')
-rw-r--r-- | src/libc/intr.c | 9 |
1 files changed, 5 insertions, 4 deletions
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 <camellia/intr.h> +#include <stdio.h> #include <stdlib.h> -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); } |