1 #ifndef __LUNAIX_CONTEXT_H
2 #define __LUNAIX_CONTEXT_H
7 typedef struct pcontext isr_param;
9 #include <lunaix/compiler.h>
10 #include <sys/interrupts.h>
12 struct transfer_context
17 struct exec_param eret;
22 inject_transfer_context(ptr_t vm_mnt, struct transfer_context* tctx);
25 thread_setup_trasnfer(struct transfer_context* tctx,
26 ptr_t kstack_tp, ptr_t ustack_pt,
27 ptr_t entry, bool to_user);
30 thread_create_user_transfer(struct transfer_context* tctx,
31 ptr_t kstack_tp, ptr_t ustack_pt,
34 thread_setup_trasnfer(tctx, kstack_tp, ustack_pt, entry, true);
38 thread_create_kernel_transfer(struct transfer_context* tctx,
39 ptr_t kstack_tp, ptr_t entry)
41 thread_setup_trasnfer(tctx, kstack_tp, 0, entry, false);
44 #endif /* __LUNAIX_CONTEXT_H */