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

28
kernel/libk/libk.c Normal file
View File

@@ -0,0 +1,28 @@
//
// Created by rick on 02-02-21.
//
#include <stdbool.h>
#include "libk.h"
#include "kprint.h"
bool k_addr_in_kspace(void* addr) {
return addr > kernel_start && addr < kernel_end;
}
void k_wait_for_interrupt() {
__asm__ __volatile__("hlt;");
}
void k_panics(const char *msg) {
kprint(msg);
kprint("PANIC!");
__asm__ __volatile__("cli;"
"hlt;");
}
void k_panic() {
kprint("PANIC!");
__asm__ __volatile__("cli;"
"hlt;");
}