apio
1c12cf016e
Finally. Just Round Robin with sleeping, but it's still awesome. I think this can finish v0.3, with a few adjustments.
15 lines
282 B
C++
15 lines
282 B
C++
#pragma once
|
|
#include "thread/Task.h"
|
|
|
|
namespace Scheduler
|
|
{
|
|
void init();
|
|
void yield();
|
|
void sleep(unsigned long ms);
|
|
void add_kernel_task(void (*task)(void));
|
|
|
|
Task* current_task();
|
|
|
|
void task_yield(Context* context);
|
|
void task_tick(Context* context);
|
|
} |