Luna/kernel/include/thread/Scheduler.h

23 lines
473 B
C
Raw Normal View History

#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));
2022-09-23 14:41:43 +00:00
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 reap_task(Task* task);
void reap_tasks();
}