aboutsummaryrefslogtreecommitdiff
path: root/include/apos/tcb.h
blob: bd66aff3dd90b107a137f9ae31dcc8e878492b4c (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
26
27
28
29
#ifndef APOS_TCB_H
#define APOS_TCB_H

#include <apos/mem_regions.h>
#include <apos/types.h>
#include <tcb.h> /* arch-specific data */

struct tcb {
	struct sp_node sp_n;
	struct sp_reg_root sp_r;
	struct arch_tcbd tcbd;

	id_t pid;
	id_t tid;

	vm_t callback;
	vm_t proc_stack;
	vm_t call_stack;

	vm_t entry;

	struct vm_branch *b_r;
};

stat_t threads_insert(struct tcb *t);
struct tcb *cur_tcb();
struct tcb *get_tcb(id_t tid);

#endif /* APOS_TCB_H */