feat: some refactors
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user