Luna/kernel/include/thread/Scheduler.h
apio f1a7138568 User mode (with a few syscalls)
IT ACTUALLY WORKS NOW.

Why wasn't it working? Oh, because I was not setting already present page tables's permissions to user mode. Just a little bug. THAT I SPENT DAYS TRYING TO FIND

Anyways, it works now. Such a relief...
2022-09-25 20:35:05 +02:00

24 lines
512 B
C++

#pragma once
#include "thread/Task.h"
namespace Scheduler
{
void init();
void yield();
void exit();
void sleep(unsigned long ms);
void add_kernel_task(void (*task)(void));
void add_user_task(void* task);
void task_exit(Context* context);
void task_misbehave(Context* context);
Task* current_task();
void task_yield(Context* context);
void task_tick(Context* context);
void task_sleep(Context* context);
void reap_task(Task* task);
void reap_tasks();
}