From 08c446612959fb190c7d6f604c69031007c3bc23 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Wed, 7 Feb 2024 11:43:39 +0100 Subject: Remove sti and cli inline assembly --- kernel/cpu/syscall.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'kernel/cpu/syscall.c') diff --git a/kernel/cpu/syscall.c b/kernel/cpu/syscall.c index 5e51d53..072351d 100644 --- a/kernel/cpu/syscall.c +++ b/kernel/cpu/syscall.c @@ -11,6 +11,7 @@ #include #include #include +#include #pragma GCC diagnostic ignored "-Wpedantic" @@ -69,7 +70,7 @@ void syscall_exit(int status) { } void syscall_wait(int *status) { - asm("cli"); + disable_interrupts(); if (!get_current_task()->child) { if (status) *status = -1; @@ -105,7 +106,7 @@ int syscall_brk(void *addr) { } void *syscall_sbrk(uintptr_t increment) { - asm("cli"); + disable_interrupts(); void *rc = get_current_task()->data_segment_end; void *n = (void *)((uintptr_t)(get_current_task()->data_segment_end) + increment); -- cgit v1.2.3