Luna/kernel/include/thread/Scheduler.h
apio 136c0b3ae9 Scheduler: add a reset_task function
This can be used later to implement execve()
2022-10-12 17:08:45 +02:00

27 lines
618 B
C++

#pragma once
#include "thread/Task.h"
namespace Scheduler
{
void init();
void yield();
void exit(int status);
void sleep(unsigned long ms);
void add_kernel_task(void (*task)(void));
void add_user_task(void* task);
void load_user_task(const char* filename);
void task_exit(Context* context, int64_t status);
void task_misbehave(Context* context, int64_t status);
Task* current_task();
void task_yield(Context* context);
void task_tick(Context* context);
void reap_task(Task* task);
void reap_tasks();
void reset_task(Task* task, ELFImage* new_image);
}