forked from xamidev/pepperOS
Function comments (v1)
This commit is contained in:
@@ -14,12 +14,24 @@ extern struct process_t* processes_list;
|
||||
extern struct process_t* current_process;
|
||||
extern struct process_t* idle_proc;
|
||||
|
||||
/*
|
||||
* scheduler_init - Choose the first process
|
||||
*/
|
||||
void scheduler_init()
|
||||
{
|
||||
// Choose first process?
|
||||
current_process = processes_list;
|
||||
}
|
||||
|
||||
/*
|
||||
* scheduler_schedule - Main scheduling routine
|
||||
* @context: CPU context of previous process
|
||||
*
|
||||
* Chooses the next process that we should run.
|
||||
* The routine is executed every SCHEDULER_QUANTUM ticks.
|
||||
*
|
||||
* Return:
|
||||
* <context> - CPU context for next process
|
||||
*/
|
||||
struct cpu_status_t* scheduler_schedule(struct cpu_status_t* context)
|
||||
{
|
||||
if (context == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user