summaryrefslogtreecommitdiff
path: root/kernel/cpu/syscall.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-02-07 11:43:39 +0100
committerAnton Kling <anton@kling.gg>2024-02-07 22:25:47 +0100
commit08c446612959fb190c7d6f604c69031007c3bc23 (patch)
treef78718190c5c86c5a5882a5260470402277b345d /kernel/cpu/syscall.c
parent44508f1c962060b68527fa020969ec04d3e250c6 (diff)
Remove sti and cli inline assembly
Diffstat (limited to 'kernel/cpu/syscall.c')
-rw-r--r--kernel/cpu/syscall.c5
1 files changed, 3 insertions, 2 deletions
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 <string.h>
#include <syscalls.h>
#include <typedefs.h>
+#include <interrupts.h>
#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);