You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
707 B
C

3 years ago
#ifndef H_SCHED
#define H_SCHED
#include "../kernel.h"
#include "ktypes.h"
3 years ago
// scheduling data:
extern ProcessControlBlock processes[PROCESS_COUNT];
// scheduler methods
ProcessControlBlock* scheduler_select_free();
3 years ago
int scheduler_create_process(int binid);
void set_next_interrupt();
3 years ago
void __attribute__((noreturn)) scheduler_run_next();
void __attribute__((noreturn)) scheduler_try_return_to(ProcessControlBlock*);
void __attribute__((noreturn)) scheduler_switch_to(ProcessControlBlock*);
3 years ago
int scheduler_index_from_pid(int pid);
int* get_current_process_registers();
ProcessControlBlock* get_current_process();
void mark_ecall_entry();
int create_new_process(loaded_binary* bin, int stack_size);
3 years ago
#endif