mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 22:25:07 +00:00
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. :^)
This commit is contained in:
parent
874ebbe4a5
commit
fbeb1ab15b
5 changed files with 69 additions and 277 deletions
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue