feat: some refactors

This commit is contained in:
2021-02-02 22:35:28 +01:00
parent 4673a23db7
commit e8816cfdfd
10 changed files with 162 additions and 57 deletions

View File

@@ -10,6 +10,7 @@
#include <libc/stdbool.h>
#include <libc/ringqueue.h>
#include <mem/mem.h>
#include <libk.h>
const char scancode_map_lowercase[] = {
@@ -88,7 +89,7 @@ char getc() {
KeyEvent *get_next_event() {
KeyEvent *target = malloc(sizeof(KeyEvent));
if (!ring_buffer_get(keyboard_event_buffer, target)) {
asm("hlt");
k_wait_for_interrupt();
free(target);
return NULL;
}