apio
1c12cf016e
Finally. Just Round Robin with sleeping, but it's still awesome. I think this can finish v0.3, with a few adjustments.
16 lines
292 B
C
16 lines
292 B
C
#pragma once
|
|
#include "interrupts/Context.h"
|
|
|
|
struct Task
|
|
{
|
|
uint64_t id;
|
|
Context regs;
|
|
|
|
int64_t task_sleep = 0;
|
|
int64_t task_time = 0;
|
|
|
|
Task* next_task = nullptr;
|
|
};
|
|
|
|
void set_context_from_task(Task& task, Context* ctx);
|
|
void get_context_to_task(Task& task, Context* ctx); |