wip: thread and processes handle

This commit is contained in:
0x35c
2025-11-05 16:19:21 +01:00
parent 56cfe9f2be
commit 374ea13173
25 changed files with 243 additions and 340 deletions

25
headers/process.h Normal file
View File

@ -0,0 +1,25 @@
#pragma once
#include "signal.h"
#include <stdint.h>
extern struct pcb *current_pcb;
enum owner { OWNER_KERNEL, OWNER_USER };
struct pcb {
void *cr3;
uint32_t *heap;
uint16_t pid;
uint8_t uid;
struct signal_data signals;
struct pcb *next;
struct pcb *prev;
struct tcb *thread_list;
};
void switch_process(struct pcb *next_pcb);
struct pcb *create_process(uint8_t uid);
int8_t create_kernel_process(void);
void remove_process(struct pcb *pcb);