Adding a scheduler function and cleanup

This commit is contained in:
2018-03-29 12:28:10 +02:00
parent b5f5a40fbc
commit a39fdcf3ce
3 changed files with 40 additions and 42 deletions

View File

@@ -10,7 +10,7 @@
void thread_function()
{
int thread_id = current_thread()->tid;
int thread_id = thread()->tid;
while(1)
{
@@ -40,7 +40,8 @@ void kmain(uint64_t multiboot_magic, void *multiboot_data)
ready(new_thread(thread_function));
ready(new_thread(thread_function));
ready(new_thread(thread_function));
yield();
start_scheduler();
PANIC("Reached end of kernel main function\n");
for(;;);