From fbeb1ab15b8e1730a42eb43b4b211d17fe2bbb01 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 9 Nov 2019 22:18:16 +0100 Subject: Kernel: Use a lookup table for syscalls Instead of the big ugly switch statement, build a lookup table using the syscall enumeration macro. This greatly simplifies the syscall implementation. :^) --- Kernel/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Kernel/init.cpp') diff --git a/Kernel/init.cpp b/Kernel/init.cpp index 16f03a59e8..ee00438879 100644 --- a/Kernel/init.cpp +++ b/Kernel/init.cpp @@ -307,7 +307,7 @@ extern "C" [[noreturn]] void init(u32 physical_address_for_kernel_page_tables) Process::create_kernel_process("init_stage2", init_stage2); Process::create_kernel_process("syncd", [] { for (;;) { - Syscall::sync(); + VFS::the().sync(); current->sleep(1 * TICKS_PER_SECOND); } }); -- cgit v1.2.3