feat: moved libk stuff to libk folder
This commit is contained in:
22
kernel/libk/syscall.c
Normal file
22
kernel/libk/syscall.c
Normal 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"); };
|
||||
}
|
||||
Reference in New Issue
Block a user