summaryrefslogtreecommitdiffstats
path: root/src/include/kernel/task.H
blob: c27c7e8cee58554f2fbc1073870bd656c4ca683a (plain)
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
26
27
28
29
#ifndef __KERNEL_TASK_H
#define __KERNEL_TASK_H

#include <kernel/types.h>

struct context_t
{
    void* stack_ptr;
    void* nip;
    uint64_t gprs[32];
    uint64_t lr;
    uint64_t cr;
    uint64_t ctr;
    uint64_t xer;
};

struct task_t
{
    cpu_t* cpu;
    context_t context;
    
    tid_t tid;
    task_t* prev;
    task_t* next;
};

enum { TASK_DEFAULT_STACK_SIZE = 4 };

#endif
OpenPOWER on IntegriCloud