26 lines
457 B
C
26 lines
457 B
C
#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);
|