Luna/kernel/src/thread/Scheduler.h

23 lines
460 B
C
Raw Normal View History

2022-12-07 14:03:34 +00:00
#pragma once
#include "thread/Thread.h"
namespace Scheduler
{
void init();
Thread* current();
2022-12-07 14:55:58 +00:00
Thread* idle();
2022-12-07 14:03:34 +00:00
Result<void> new_kernel_thread(u64 address);
Result<void> new_kernel_thread(void (*func)(void));
Result<void> new_kernel_thread(void (*func)(void*), void* arg);
Thread* pick_task();
void switch_task(Registers* regs);
void invoke(Registers* regs);
2022-12-07 14:55:58 +00:00
}
extern "C" void kernel_yield();
void kernel_sleep(u64 ms);