From 58514d351e1f0e8871f534422cf025109ddbb844 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Fri, 26 Jul 2024 21:40:57 +0200 Subject: kernel: implement _sys_intr_return --- src/libk/include/camellia/syscalls.h | 3 +++ src/libk/include/camellia/types.h | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/libk/include') diff --git a/src/libk/include/camellia/syscalls.h b/src/libk/include/camellia/syscalls.h index 16576e0..628a511 100644 --- a/src/libk/include/camellia/syscalls.h +++ b/src/libk/include/camellia/syscalls.h @@ -24,6 +24,7 @@ #define _SYS_TIME 23 #define _SYS_GETNULL 24 #define _SYS_DUPLEX 25 +#define _SYS_INTR_RETURN 26 #define _SYS_EXECBUF 100 #define _SYS_DEBUG_KLOG 101 @@ -92,6 +93,8 @@ hid_t _sys_getnull(int flags); long _sys_duplex(hid_t from, hid_t to, int flags); +void _sys_intr_return(struct intr_data __user *intr, int flags); + /* see shared/execbuf.h */ long _sys_execbuf(void __user *buf, size_t len); diff --git a/src/libk/include/camellia/types.h b/src/libk/include/camellia/types.h index 9cbd386..86ffb56 100644 --- a/src/libk/include/camellia/types.h +++ b/src/libk/include/camellia/types.h @@ -36,12 +36,11 @@ struct intr_data { /* same order as CpuRegs. * notable omissions: * - SSE registers (usually there's no need to save them, userland can do - * that itself if it wants) - * - FLAGS (so the kernel doesn't need to care about sanitizing it) */ + * that itself if it wants) */ uint64_t r15, r14, r13, r12, r11, r10, r9, r8; uint64_t rdi, rsi; userptr_t rbp, rsp; - uint64_t rbx, rdx, rcx, rax, rip; + uint64_t rbx, rdx, rcx, rax, rip, flags; char msg[]; /* variable size, NUL terminated */ }; -- cgit v1.2.3