feat: introduced tasking, added paging (no vm), moved malloc, added

syscalls, other stuff
This commit is contained in:
2021-02-27 11:46:26 +01:00
parent 8f615b259c
commit 9f72d4bb1a
42 changed files with 907 additions and 292 deletions

22
kernel/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"); };
}