Major refactor of codebase

This commit is contained in:
ssimnb 2026-02-14 18:11:37 +01:00
parent dbc6dc0d7c
commit f478f8d38b
125 changed files with 195 additions and 29519 deletions

View file

@ -1,33 +0,0 @@
#include <stdint.h>
#pragma once
typedef enum proc_state {
RUNNING = 3,
READY = 2,
SLEEPING = 1,
UNUSED = 0
}proc_state;
struct context {
uint64_t r15, r14, r13, r12, rbp, rbx, rip;
};
struct thread {
struct thread *next;
struct thread *prev;
uint64_t *mem;
uint64_t *kstack;
proc_state state;
uint16_t pid;
struct context *context;
};
void scheduler_init();
[[noreturn]] void sched();
void yield();
#define PROC_MAX 512 // Max number of processes
#define INITIAL_STACK_SIZE 0x10000