From 8d39f3f67734bf39cada370c39243e6ef33bf4a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matteo=20Gm=C3=BCr?= Date: Sun, 18 May 2025 14:45:05 +0000 Subject: Make new usable for both kernel and user calls --- arch/x86_64/src/context_switching/syscall/syscall_handler.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/x86_64/src/context_switching/syscall') diff --git a/arch/x86_64/src/context_switching/syscall/syscall_handler.cpp b/arch/x86_64/src/context_switching/syscall/syscall_handler.cpp index 9cc6edf..cd1c8a2 100644 --- a/arch/x86_64/src/context_switching/syscall/syscall_handler.cpp +++ b/arch/x86_64/src/context_switching/syscall/syscall_handler.cpp @@ -60,6 +60,12 @@ namespace teachos::arch::context_switching::syscall case type::EXPAND_HEAP: result = expand_user_heap(); break; + case type::ASSERT: + if (!arg_0) + { + teachos::arch::exception_handling::panic(reinterpret_cast(arg_1)); + } + break; default: teachos::arch::exception_handling::panic("[Syscall Handler] Invalid syscall number"); break; -- cgit v1.2.3