#ifndef KSCHEDULER_H
#define KSCHEDULER_H

#include "process.h"
#include <stdint.h>

void lock_scheduler();
void unlock_scheduler();

void init_scheduler();
void init_task(process_t* process, uint32_t entry_point, uint32_t cr3, int user, uint32_t u_esp);

process_t* current_task();
process_t* get_task_by_pid(uint32_t pid);

int get_next_pid();
void add_task(process_t* task);

void sleep(uint32_t ms);
void yield();
void exit();
void wake(process_t* task);

#endif