Lines Matching refs:ucp

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