summaryrefslogtreecommitdiff
path: root/kc/core/task.c
diff options
context:
space:
mode:
Diffstat (limited to 'kc/core/task.c')
-rw-r--r--kc/core/task.c24
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)