Add Scheduler wireframe.
Right now does nothing but has containing classes for process and thread information.
This commit is contained in:
parent
de2c96b848
commit
960cbf9519
8 changed files with 208 additions and 1 deletions
24
zion/scheduler/scheduler.h
Normal file
24
zion/scheduler/scheduler.h
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#pragma once
|
||||
|
||||
#include "scheduler/process.h"
|
||||
#include "scheduler/thread.h"
|
||||
|
||||
namespace sched {
|
||||
|
||||
// Create the scheduler object in a disabled state,
|
||||
// processes can be added but will not be scheduled.
|
||||
void InitScheduler();
|
||||
|
||||
// Enables the scheduler such that processes will yield on ticks.
|
||||
void EnableScheduler();
|
||||
|
||||
void Yield();
|
||||
|
||||
// Scheduler will take ownership
|
||||
// of the created process.
|
||||
void InsertProcess(Process* proc);
|
||||
|
||||
Process& CurrentProcess();
|
||||
Thread& CurrentThread();
|
||||
|
||||
} // namespace sched
|
||||
Loading…
Add table
Add a link
Reference in a new issue