Files
my-kern/kernel/libk/syscall.c

22 lines
366 B
C

//
// Created by rick on 22-02-21.
//
#include "syscall.h"
#include <types.h>
#include <attributes.h>
void syscall1(uint32_t arg1) {
__asm__("int $0x80"
:
: "a"(arg1));
}
void syscall_yield_job() {
syscall1(SYSCALL_YIELD_JOB);
}
void noreturn syscall_start_scheduler() {
syscall1(SYSCALL_START_SCHEDULER);
while (1) { __asm__("hlt"); };
}