X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/6c506d8916fb114675e93d0e2cb20831d4022294..d1b1c8d9119229dbeed06cd252917e54a1cb77f6:/lunaix-os/includes/lunaix/pcontext.h?ds=sidebyside diff --git a/lunaix-os/includes/lunaix/pcontext.h b/lunaix-os/includes/lunaix/pcontext.h deleted file mode 100644 index 77e7614..0000000 --- a/lunaix-os/includes/lunaix/pcontext.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef __LUNAIX_CONTEXT_H -#define __LUNAIX_CONTEXT_H - -struct exec_param; -struct regcontext; -struct pcontext; -typedef struct pcontext isr_param; - -#include -#include - -struct transfer_context -{ - ptr_t inject; - struct { - struct pcontext isr; - struct exec_param eret; - } compact transfer; -}; - -bool -inject_transfer_context(ptr_t vm_mnt, struct transfer_context* tctx); - -void -thread_setup_trasnfer(struct transfer_context* tctx, - ptr_t kstack_tp, ptr_t ustack_pt, - ptr_t entry, bool to_user); - -static inline void -thread_create_user_transfer(struct transfer_context* tctx, - ptr_t kstack_tp, ptr_t ustack_pt, - ptr_t entry) -{ - thread_setup_trasnfer(tctx, kstack_tp, ustack_pt, entry, true); -} - -static inline void -thread_create_kernel_transfer(struct transfer_context* tctx, - ptr_t kstack_tp, ptr_t entry) -{ - thread_setup_trasnfer(tctx, kstack_tp, 0, entry, false); -} - -#endif /* __LUNAIX_CONTEXT_H */