Lines Matching defs:ucp
57 savecontext(ucontext_t *ucp, const k_sigset_t *mask)
66 bzero(&ucp->uc_mcontext.fpregs.fpu_en, sizeof (ucontext_t) -
72 (&ucp->uc_flags)[1] = 0;
73 (&ucp->uc_stack.ss_flags)[1] = 0;
81 ucp->uc_flags = UC_ALL;
82 ucp->uc_link = (ucontext_t *)lwp->lwp_oldcontext;
91 copyin((void *)lwp->lwp_ustack, &ucp->uc_stack,
92 sizeof (ucp->uc_stack)) != 0 ||
93 ucp->uc_stack.ss_size == 0) {
96 ucp->uc_stack = lwp->lwp_sigaltstack;
98 ucp->uc_stack.ss_sp = p->p_usrstack - p->p_stksize;
99 ucp->uc_stack.ss_size = p->p_stksize;
100 ucp->uc_stack.ss_flags = 0;
104 getgregs(lwp, ucp->uc_mcontext.gregs);
105 getasrs(lwp, ucp->uc_mcontext.asrs);
107 getfpregs(lwp, &ucp->uc_mcontext.fpregs);
108 getfpasrs(lwp, ucp->uc_mcontext.asrs);
109 if (ucp->uc_mcontext.fpregs.fpu_en == 0)
110 ucp->uc_flags &= ~UC_FPU;
111 ucp->uc_mcontext.gwins = (gwindows_t *)NULL;
116 sigktou(mask, &ucp->uc_sigmask);
121 restorecontext(ucontext_t *ucp)
125 mcontext_t *mcp = &ucp->uc_mcontext;
132 lwp->lwp_oldcontext = (uintptr_t)ucp->uc_link;
134 if (ucp->uc_flags & UC_STACK) {
135 if (ucp->uc_stack.ss_flags == SS_ONSTACK)
136 lwp->lwp_sigaltstack = ucp->uc_stack;
141 if (ucp->uc_flags & UC_CPU) {
148 xregs_setgregs(lwp, xregs_getptr(lwp, ucp));
151 if (ucp->uc_flags & UC_FPU) {
152 fpregset_t *fp = &ucp->uc_mcontext.fpregs;
158 xregs_setfpregs(lwp, xregs_getptr(lwp, ucp));
162 if (ucp->uc_flags & UC_SIGMASK) {
168 sigutok(&ucp->uc_sigmask, &t->t_hold);
185 ucontext_t *ucp;
224 ucp = arg;
225 if (ucp == NULL)
231 if (copyin(ucp, &uc, sizeof (ucontext_t) -
241 if (copyin(&ucp->uc_mcontext.xrs, &uc.uc_mcontext.xrs,
250 if (copyin(&ucp->uc_mcontext.fpregs,
305 if (copyin(&ucp->uc_mcontext.asrs, &uc.uc_mcontext.asrs,
354 savecontext32(ucontext32_t *ucp, const k_sigset_t *mask, struct fq32 *dfq)
364 bzero(&ucp->uc_mcontext.fpregs.fpu_en, sizeof (ucontext32_t) -
370 (&ucp->uc_stack.ss_flags)[1] = 0;
378 ucp->uc_flags = UC_ALL;
379 ucp->uc_link = (caddr32_t)lwp->lwp_oldcontext;
388 copyin((void *)lwp->lwp_ustack, &ucp->uc_stack,
389 sizeof (ucp->uc_stack)) != 0 ||
390 ucp->uc_stack.ss_size == 0) {
393 ucp->uc_stack.ss_sp =
395 ucp->uc_stack.ss_size =
397 ucp->uc_stack.ss_flags = SS_ONSTACK;
399 ucp->uc_stack.ss_sp =
401 ucp->uc_stack.ss_size =
403 ucp->uc_stack.ss_flags = 0;
407 getgregs32(lwp, ucp->uc_mcontext.gregs);
409 fpuregset_nto32(&fpregs, &ucp->uc_mcontext.fpregs, dfq);
411 if (ucp->uc_mcontext.fpregs.fpu_en == 0)
412 ucp->uc_flags &= ~UC_FPU;
413 ucp->uc_mcontext.gwins = (caddr32_t)NULL;
419 sigktou(mask, (sigset_t *)&ucp->uc_sigmask);
435 ucontext32_t *ucp;
474 ucp = arg;
475 if (ucp == NULL)
481 if (copyin(ucp, &uc, sizeof (uc) - sizeof (uc.uc_filler) -
489 if (copyin(&ucp->uc_mcontext.xrs, &uc.uc_mcontext.xrs,
498 if (copyin(&ucp->uc_mcontext.fpregs,