wip: fork()
This commit is contained in:
@ -1,10 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "process.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define STACK_SIZE PAGE_SIZE * 4
|
||||
#define STACK_SIZE PAGE_SIZE * 4
|
||||
#define CURRENT_TCB ((struct tcb *)current_tcb->content)
|
||||
|
||||
typedef uint16_t tid_t;
|
||||
|
||||
typedef enum {
|
||||
NEW,
|
||||
@ -16,10 +17,9 @@ typedef enum {
|
||||
struct tcb {
|
||||
uint32_t *esp;
|
||||
uint32_t *esp0;
|
||||
uint16_t tid;
|
||||
tid_t tid;
|
||||
state_t state;
|
||||
struct pcb *process;
|
||||
struct tcb *next;
|
||||
};
|
||||
|
||||
struct tcb *create_thread(struct pcb *process, void (*entry)(void));
|
||||
|
||||
Reference in New Issue
Block a user