summaryrefslogtreecommitdiffstats
path: root/arch/x86_64/hal/process.h
blob: c3530bfaec4ad6b661effad6b5a4f1bb3803cc77 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef _JOVE_x86_64_HAL_PROCESS_H
#define _JOVE_x86_64_HAL_PROCESS_H 1

#include "hal/process.h"
#include "arch/x86_64/x86_64.h"

typedef struct process_control_block
{
    pid_t pid;
    jove_owned_obj_t *rootdir;
    jove_owned_obj_t *iopb;
    uintptr_t pml4;

    enum pcb_state state;
    int killed;
    struct pcb_mailbox send, recv;
    
    struct cpu_context context;
    void *ksp;
    char kstack[];
} pcb_t;

#define PCB_KSTACK_SIZE (0x1000 - sizeof(pcb_t))

#endif