summaryrefslogtreecommitdiffstats
path: root/include/arch/x86_64/tcb.h
blob: ae93bdfdebd56492c47554d66a979c9386d2d28d (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
#ifndef _JOVE_x86_64_TCB_H
#define _JOVE_x86_64_TCB_H 1

#include <stdint.h>
#include <stddef.h>

#define KERNEL_STACK_MINSIZE 0x1000

typedef struct jove_ThreadControlBlock
{
    size_t size;
    struct jove_ThreadControlBlock *tcb_next, *sched_next;
    uint8_t priority;

    uintptr_t sp, ksp;
    void *pml4;
    void *mailbox;

    /* PML caching for faster calls?*/

    uint8_t kstack[];
} tcb_t;

#endif