wip: TSS added to the gdt and start to implement scheduler

This commit is contained in:
2025-01-13 15:46:09 +01:00
parent 916e8b6f19
commit b9691b1948
9 changed files with 156 additions and 8 deletions

23
headers/task.h Normal file
View File

@ -0,0 +1,23 @@
#pragma once
#include "list.h"
#include <stdint.h>
enum status { ZOMBIE, THREAD, RUN };
struct task {
uint32_t *esp;
uint32_t *esp0;
uint32_t *cr3;
uint16_t pid;
uint8_t status;
struct task *daddy;
struct task *child;
struct list **signals;
uint8_t owner_id;
struct task *next;
};
void scheduler(void);
void switch_to_task(struct task *next_task);