340a0ee9f3a9605c55d427613a9746fbad3ff43f
[lunaix-os.git] / lunaix-os / arch / generic / includes / sys / hart.h
1 #ifndef __LUNAIX_ARCH_HART_H
2 #define __LUNAIX_ARCH_HART_H
3
4 #ifndef __ASM__
5 #include <lunaix/compiler.h>
6 #include <sys/cpu.h>
7
8 struct exec_param;
9
10 struct regcontext
11 {
12     
13 } compact;
14
15 struct hart_state
16 {
17     
18 } compact;
19
20 struct exec_param
21 {
22     struct hart_state* parent_state;
23 } compact;
24
25 void
26 hart_flow_redirect(struct hart_state* state, ptr_t pc, ptr_t sp);
27
28 ptr_t
29 hart_pc(struct hart_state* state);
30
31 ptr_t
32 hart_sp(struct hart_state* state);
33
34 bool
35 kernel_context(struct hart_state* hstate);
36
37 ptr_t
38 hart_stack_frame(struct hart_state* hstate);
39
40 int
41 hart_vector_stamp(struct hart_state* hstate);
42
43 unsigned int
44 hart_ecause(struct hart_state* hstate);
45
46 struct hart_state*
47 hart_parent_state(struct hart_state* hstate);
48
49 void
50 hart_push_state(struct hart_state* p_hstate, struct hart_state* hstate);
51
52 #endif
53
54 #endif /* __LUNAIX_ARCH_HART_H */