Lines Matching refs:ucp

97 savecontext(ucontext_t *ucp, const k_sigset_t *mask, savecontext_flags_t flags)  in savecontext()  argument
120 user_xsave = ucp->uc_xsave; in savecontext()
132 bzero(&ucp->uc_mcontext.fpregs, sizeof (ucontext_t) - in savecontext()
134 ucp->uc_xsave = user_xsave; in savecontext()
136 ucp->uc_flags = UC_ALL; in savecontext()
137 ucp->uc_link = (struct ucontext *)lwp->lwp_oldcontext; in savecontext()
146 copyin((void *)lwp->lwp_ustack, &ucp->uc_stack, in savecontext()
147 sizeof (ucp->uc_stack)) != 0 || in savecontext()
148 ucp->uc_stack.ss_size == 0) { in savecontext()
151 ucp->uc_stack = lwp->lwp_sigaltstack; in savecontext()
153 ucp->uc_stack.ss_sp = p->p_usrstack - p->p_stksize; in savecontext()
154 ucp->uc_stack.ss_size = p->p_stksize; in savecontext()
155 ucp->uc_stack.ss_flags = 0; in savecontext()
190 getgregs(lwp, ucp->uc_mcontext.gregs); in savecontext()
193 getfpregs(lwp, &ucp->uc_mcontext.fpregs); in savecontext()
195 ucp->uc_flags &= ~UC_FPU; in savecontext()
197 sigktou(mask, &ucp->uc_sigmask); in savecontext()
209 ucp->uc_flags |= UC_XSAVE; in savecontext()
220 ret = fpu_signal_copyout(lwp, ucp->uc_xsave, in savecontext()
223 ret = fpu_signal_copyout(lwp, ucp->uc_xsave, copyout); in savecontext()
233 restorecontext(ucontext_t *ucp) in restorecontext() argument
238 lwp->lwp_oldcontext = (uintptr_t)ucp->uc_link; in restorecontext()
240 if (ucp->uc_flags & UC_STACK) { in restorecontext()
241 if (ucp->uc_stack.ss_flags == SS_ONSTACK) in restorecontext()
242 lwp->lwp_sigaltstack = ucp->uc_stack; in restorecontext()
247 if (ucp->uc_flags & UC_CPU) { in restorecontext()
256 setgregs(lwp, ucp->uc_mcontext.gregs); in restorecontext()
267 if (ucp->uc_flags & UC_XSAVE) { in restorecontext()
268 ASSERT0(ucp->uc_flags & UC_FPU); in restorecontext()
269 ASSERT3U((uintptr_t)ucp->uc_xsave, >=, _kernelbase); in restorecontext()
270 fpu_set_xsave(lwp, (const void *)ucp->uc_xsave); in restorecontext()
271 } else if (ucp->uc_flags & UC_FPU) { in restorecontext()
272 setfpregs(lwp, &ucp->uc_mcontext.fpregs); in restorecontext()
275 if (ucp->uc_flags & UC_SIGMASK) { in restorecontext()
281 sigutok(&ucp->uc_sigmask, &t->t_hold); in restorecontext()
292 ucontext_t *ucp; in getsetcontext() local
337 ucp = arg; in getsetcontext()
338 if (copyin(&ucp->uc_xsave, &uc.uc_xsave, in getsetcontext()
353 ucp = arg; in getsetcontext()
354 if (ucp == NULL) in getsetcontext()
360 if (copyin(ucp, &uc, offsetof(ucontext_t, uc_filler) - in getsetcontext()
368 copyin(&ucp->uc_mcontext.fpregs, &uc.uc_mcontext.fpregs, in getsetcontext()
377 if (copyin(&ucp->uc_xsave, &uc.uc_xsave, in getsetcontext()
414 savecontext32(ucontext32_t *ucp, const k_sigset_t *mask, in savecontext32() argument
430 user_xsave = ucp->uc_xsave; in savecontext32()
437 bzero(&ucp->uc_mcontext.fpregs, sizeof (ucontext32_t) - in savecontext32()
439 ucp->uc_xsave = user_xsave; in savecontext32()
441 ucp->uc_flags = UC_ALL; in savecontext32()
442 ucp->uc_link = (caddr32_t)lwp->lwp_oldcontext; in savecontext32()
445 copyin((void *)lwp->lwp_ustack, &ucp->uc_stack, in savecontext32()
446 sizeof (ucp->uc_stack)) != 0 || in savecontext32()
447 ucp->uc_stack.ss_size == 0) { in savecontext32()
450 ucp->uc_stack.ss_sp = in savecontext32()
452 ucp->uc_stack.ss_size = in savecontext32()
454 ucp->uc_stack.ss_flags = SS_ONSTACK; in savecontext32()
456 ucp->uc_stack.ss_sp = (caddr32_t)(uintptr_t) in savecontext32()
458 ucp->uc_stack.ss_size = (size32_t)p->p_stksize; in savecontext32()
459 ucp->uc_stack.ss_flags = 0; in savecontext32()
483 getgregs32(lwp, ucp->uc_mcontext.gregs); in savecontext32()
486 getfpregs32(lwp, &ucp->uc_mcontext.fpregs); in savecontext32()
488 ucp->uc_flags &= ~UC_FPU; in savecontext32()
490 sigktou(mask, &ucp->uc_sigmask); in savecontext32()
496 ucp->uc_flags |= UC_XSAVE; in savecontext32()
506 uaddr = (uintptr_t)(uint32_t)ucp->uc_xsave; in savecontext32()
521 ucontext32_t *ucp; in getsetcontext32() local
547 ucp = arg; in getsetcontext32()
548 if (copyin(&ucp->uc_xsave, &uc.uc_xsave, in getsetcontext32()
562 ucp = arg; in getsetcontext32()
563 if (ucp == NULL) in getsetcontext32()
565 if (copyin(ucp, &uc, offsetof(ucontext32_t, uc_filler) - in getsetcontext32()
572 copyin(&ucp->uc_mcontext.fpregs, &uc.uc_mcontext.fpregs, in getsetcontext32()
579 copyin(&ucp->uc_xsave, &uc.uc_xsave, in getsetcontext32()