From ab055a4d66aade117b0923a304730614bfa28636 Mon Sep 17 00:00:00 2001 From: antifallobst Date: Sat, 18 Feb 2023 17:58:54 +0100 Subject: [PATCH] fix (kernel): renamed 'start_scheduler' syscall to 'scheduler_start' --- kernel/inc/platform/syscall.h | 2 +- kernel/src/platform/syscall.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/kernel/inc/platform/syscall.h b/kernel/inc/platform/syscall.h index 0b6f00a..43c6b60 100644 --- a/kernel/inc/platform/syscall.h +++ b/kernel/inc/platform/syscall.h @@ -26,7 +26,7 @@ typedef enum { }syscall_group_E; typedef enum { - SYSCALL_KERNEL_START_SCHEDULER = 0xFF00 + SYSCALL_KERNEL_SCHEDULER_START = 0xFF00 } syscall_E; extern void syscall_perform(syscall_E id); diff --git a/kernel/src/platform/syscall.c b/kernel/src/platform/syscall.c index fa8dc9b..dd10fdb 100644 --- a/kernel/src/platform/syscall.c +++ b/kernel/src/platform/syscall.c @@ -21,16 +21,16 @@ cpu_state_T* syscall_handle(cpu_state_T* state) { cpu_state_T* return_state = state; syscall_group_E group_id = (state->rax & 0xFF00) >> 8; - if (group_id == SYSCALLS_KERNEL && - scheduler_is_initialized() && - scheduler_get_current_process() != PROC_KERNEL) - { - log(LOG_WARNING, "non kernel process[%d:%d] tried to perform a kernel syscall (permission denied)", scheduler_get_current_process(), scheduler_get_current_thread()); - return return_state; - } +// if (group_id == SYSCALLS_KERNEL && +// scheduler_is_initialized() && +// scheduler_get_current_process() != PROC_KERNEL) +// { +// log(LOG_WARNING, "non kernel process[%d:%d] tried to perform a kernel syscall (permission denied)", scheduler_get_current_process(), scheduler_get_current_thread()); +// return return_state; +// } switch (state->rax) { - case SYSCALL_KERNEL_START_SCHEDULER: { + case SYSCALL_KERNEL_SCHEDULER_START: { scheduler_start(state); break; }