#pragma once #include "interrupts/Context.h" struct Task { enum TaskState { Idle, Running, Sleeping, Exited }; uint64_t id; Context regs; int64_t task_sleep = 0; int64_t task_time = 0; Task* next_task = nullptr; Task* prev_task = nullptr; uint64_t allocated_stack = 0; TaskState state; uint64_t cpu_time = 0; }; void set_context_from_task(Task& task, Context* ctx); void get_context_to_task(Task& task, Context* ctx);