feat: moved libk stuff to libk folder

This commit is contained in:
2021-02-27 14:11:28 +01:00
parent 9fdc89a3a6
commit 934deb7984
19 changed files with 19 additions and 19 deletions

22
kernel/libk/syscall.c Normal file
View File

@@ -0,0 +1,22 @@
//
// 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"); };
}