diff options
Diffstat (limited to 'kernel/cpu/syscall.c')
-rw-r--r-- | kernel/cpu/syscall.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/kernel/cpu/syscall.c b/kernel/cpu/syscall.c index e2ea7e3..193367e 100644 --- a/kernel/cpu/syscall.c +++ b/kernel/cpu/syscall.c @@ -182,18 +182,13 @@ int (*syscall_functions[])() = { (void(*))syscall_tmp_handle_packet, }; +void int_syscall(reg_t *r); void syscall_function_handler(u32 eax, u32 arg1, u32 arg2, u32 arg3, u32 arg4, u32 arg5, u32 ebp, u32 esp) { assert(eax < sizeof(syscall_functions) / sizeof(syscall_functions[0])); syscall_functions[eax](arg1, arg2, arg3, arg4, arg5); } -void int_syscall(reg_t *r) { - u32 syscall = r->eax; - assert(syscall < sizeof(syscall_functions) / sizeof(syscall_functions[0])); - r->eax = syscall_functions[syscall](r->ebx, r->ecx, r->edx, r->esi, r->edi); -} - void syscalls_init(void) { install_handler(int_syscall, INT_32_INTERRUPT_GATE(0x3), 0x80); } |