wip: thread and processes handle
This commit is contained in:
25
headers/process.h
Normal file
25
headers/process.h
Normal 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);
|
||||
Reference in New Issue
Block a user