diff options
| author | Ada Christine <adachristine18@gmail.com> | 2026-05-22 00:17:06 +0000 |
|---|---|---|
| committer | Ada Christine <adachristine18@gmail.com> | 2026-05-22 00:17:06 +0000 |
| commit | 1da7411533622bd5c89034fc961bd510b132ea26 (patch) | |
| tree | 896e7abeb560d0b8250c49fc881ea6c46eaf0134 /kc/core/task.c | |
| parent | bb16bd0a71a8e615441694b97813cda2f8ea8ff8 (diff) | |
remove keyboard testing, block terminated thread
Diffstat (limited to 'kc/core/task.c')
| -rw-r--r-- | kc/core/task.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/kc/core/task.c b/kc/core/task.c index 0f2149d..dc7e218 100644 --- a/kc/core/task.c +++ b/kc/core/task.c @@ -70,27 +70,6 @@ static void *idle_thread_entry(void *) return nullptr; } -#define PS2INPUT 0x60 -#define PS2STATUS 0x64 -#define PS2STATUS_IBF 0x1 - -static void keyboard_input_loop() -{ - bool has_bytes = true; - while (has_bytes) - { - has_bytes = inb(PS2STATUS) & PS2STATUS_IBF; - if (has_bytes) - { - kprintf("read byte from keyboard input: %hhd\n", inb(PS2INPUT)); - } - else - { - kprintf("no bytes in keyboard input\n"); - } - } -} - static void *sleepy_thread_entry(void *) { int thread_slept_count = 0; @@ -99,7 +78,6 @@ static void *sleepy_thread_entry(void *) { sleep_thread(1000000000); thread_slept_count++; - keyboard_input_loop(); } (void)thread_slept_count; @@ -403,7 +381,7 @@ static void terminate_action(void *result) current_thread->kernel_stack_pointer = current_thread->kernel_stack_head; // TODO: wake threads waiting // TODO: write waitng thread code - // + block_thread(TERMINATED); } void kct_terminate(union kc_thread_result result) |
