23 lines
481 B
C++
23 lines
481 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));
|
|
|
|
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();
|
|
} |