Lines Matching refs:ucp
38 static void makectx_wrapper(ucontext_t *ucp, func_t func, uint64_t *args);
43 __makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...) in __makecontext() argument
51 if ((ucp == NULL) || (ucp->uc_mcontext.mc_len != sizeof(mcontext_t))) in __makecontext()
53 else if ((argc < 0) || (argc > 6) || (ucp->uc_stack.ss_sp == NULL) || in __makecontext()
54 (ucp->uc_stack.ss_size < MINSIGSTKSZ)) { in __makecontext()
61 ucp->uc_mcontext.mc_len = 0; in __makecontext()
66 sp = (uint64_t *)(ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size); in __makecontext()
87 ucp->uc_mcontext.mc_rdi = (register_t)ucp; in __makecontext()
88 ucp->uc_mcontext.mc_rsi = (register_t)start; in __makecontext()
89 ucp->uc_mcontext.mc_rdx = (register_t)args; in __makecontext()
90 ucp->uc_mcontext.mc_rbp = 0; in __makecontext()
91 ucp->uc_mcontext.mc_rbx = (register_t)sp; in __makecontext()
92 ucp->uc_mcontext.mc_rsp = (register_t)sp; in __makecontext()
93 ucp->uc_mcontext.mc_rip = (register_t)makectx_wrapper; in __makecontext()
97 makectx_wrapper(ucontext_t *ucp, func_t func, uint64_t *args) in makectx_wrapper() argument
100 if (ucp->uc_link == NULL) in makectx_wrapper()
102 setcontext((const ucontext_t *)ucp->uc_link); in makectx_wrapper()