Defines new struct user_context (XCC)
[akaros.git] / kern / include / ros / trapframe.h
1 #ifndef ROS_INC_TRAPFRAME_H
2 #define ROS_INC_TRAPFRAME_H
3
4 #include <ros/arch/trapframe.h>
5
6 #define ROS_HW_CTX                              1
7 #define ROS_SW_CTX                              2
8
9 /* User-space context, either from a hardware event (IRQ, trap, etc), or from a
10  * syscall.  Each arch defines its types. */
11 struct user_context {
12         int                                                     type;
13         union {
14                 struct hw_trapframe             hw_tf;
15                 struct sw_trapframe             sw_tf;
16         } tf;
17 };
18
19 #endif /* ROS_INC_TRAPFRAME_H */