summaryrefslogtreecommitdiffstats
path: root/src/include/kernel/task.H
blob: 4cd19bd04508b33bbf5237aaa9a83131665ccc70 (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
#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* next;
};

enum { TASK_DEFAULT_STACK_SIZE = 4 };

#endif
OpenPOWER on IntegriCloud