apio
f1a7138568
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...
24 lines
512 B
C++
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();
|
|
} |