diff options
author | Anton Kling <anton@kling.gg> | 2024-02-21 20:06:35 +0100 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2024-02-21 20:06:35 +0100 |
commit | 9b475d3db3275d4c34f02161ae70ced5595a0fdb (patch) | |
tree | 0c50e4af3ce52017f295c44f6f4319e4a43de085 /kernel/ipc.c | |
parent | 6c9cb0bd8ceb039ce387c850e25adc6f99cfcd6f (diff) |
Kernel: Remove all inline assembly.
Now the kernel does not rely upon inline assembly which is often very
error prone. This also means that the kernel could probably be compiled
with any c99 compiler which would help future bootstrapping.
Diffstat (limited to 'kernel/ipc.c')
-rw-r--r-- | kernel/ipc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/ipc.c b/kernel/ipc.c index d051ea1..56ca79a 100644 --- a/kernel/ipc.c +++ b/kernel/ipc.c @@ -1,4 +1,5 @@ #include <assert.h> +#include <interrupts.h> #include <ipc.h> #include <math.h> #include <sched/scheduler.h> @@ -57,13 +58,13 @@ int ipc_read(u8 *buffer, u32 length, u32 *sender_pid) { return 0; } get_current_task()->is_halted = 1; - asm("sti"); + enable_interrupts(); continue; } break; } get_current_task()->is_halted = 0; - asm("cli"); + disable_interrupts(); ipc_message->is_used = 0; // TODO: Verify sender_pid is a valid address if (sender_pid) { |