Lines Matching refs:ucp

54 savecontext(ucontext_t *ucp, const k_sigset_t *mask)  in savecontext()  argument
65 bzero(&ucp->uc_mcontext.fpregs, sizeof (ucontext_t) - in savecontext()
68 ucp->uc_flags = UC_ALL; in savecontext()
69 ucp->uc_link = (struct ucontext *)lwp->lwp_oldcontext; in savecontext()
78 copyin((void *)lwp->lwp_ustack, &ucp->uc_stack, in savecontext()
79 sizeof (ucp->uc_stack)) != 0 || in savecontext()
80 ucp->uc_stack.ss_size == 0) { in savecontext()
83 ucp->uc_stack = lwp->lwp_sigaltstack; in savecontext()
85 ucp->uc_stack.ss_sp = p->p_usrstack - p->p_stksize; in savecontext()
86 ucp->uc_stack.ss_size = p->p_stksize; in savecontext()
87 ucp->uc_stack.ss_flags = 0; in savecontext()
122 getgregs(lwp, ucp->uc_mcontext.gregs); in savecontext()
124 getfpregs(lwp, &ucp->uc_mcontext.fpregs); in savecontext()
126 ucp->uc_flags &= ~UC_FPU; in savecontext()
128 sigktou(mask, &ucp->uc_sigmask); in savecontext()
135 restorecontext(ucontext_t *ucp) in restorecontext() argument
140 lwp->lwp_oldcontext = (uintptr_t)ucp->uc_link; in restorecontext()
142 if (ucp->uc_flags & UC_STACK) { in restorecontext()
143 if (ucp->uc_stack.ss_flags == SS_ONSTACK) in restorecontext()
144 lwp->lwp_sigaltstack = ucp->uc_stack; in restorecontext()
149 if (ucp->uc_flags & UC_CPU) { in restorecontext()
158 setgregs(lwp, ucp->uc_mcontext.gregs); in restorecontext()
164 if (ucp->uc_flags & UC_FPU) in restorecontext()
165 setfpregs(lwp, &ucp->uc_mcontext.fpregs); in restorecontext()
167 if (ucp->uc_flags & UC_SIGMASK) { in restorecontext()
173 sigutok(&ucp->uc_sigmask, &t->t_hold); in restorecontext()
184 ucontext_t *ucp; in getsetcontext() local
210 ucp = arg; in getsetcontext()
211 if (ucp == NULL) in getsetcontext()
217 if (copyin(ucp, &uc, sizeof (ucontext_t) - in getsetcontext()
226 copyin(&ucp->uc_mcontext.fpregs, &uc.uc_mcontext.fpregs, in getsetcontext()
257 savecontext32(ucontext32_t *ucp, const k_sigset_t *mask) in savecontext32() argument
263 bzero(&ucp->uc_mcontext.fpregs, sizeof (ucontext32_t) - in savecontext32()
266 ucp->uc_flags = UC_ALL; in savecontext32()
267 ucp->uc_link = (caddr32_t)lwp->lwp_oldcontext; in savecontext32()
270 copyin((void *)lwp->lwp_ustack, &ucp->uc_stack, in savecontext32()
271 sizeof (ucp->uc_stack)) != 0 || in savecontext32()
272 ucp->uc_stack.ss_size == 0) { in savecontext32()
275 ucp->uc_stack.ss_sp = in savecontext32()
277 ucp->uc_stack.ss_size = in savecontext32()
279 ucp->uc_stack.ss_flags = SS_ONSTACK; in savecontext32()
281 ucp->uc_stack.ss_sp = (caddr32_t)(uintptr_t) in savecontext32()
283 ucp->uc_stack.ss_size = (size32_t)p->p_stksize; in savecontext32()
284 ucp->uc_stack.ss_flags = 0; in savecontext32()
308 getgregs32(lwp, ucp->uc_mcontext.gregs); in savecontext32()
310 getfpregs32(lwp, &ucp->uc_mcontext.fpregs); in savecontext32()
312 ucp->uc_flags &= ~UC_FPU; in savecontext32()
314 sigktou(mask, &ucp->uc_sigmask); in savecontext32()
322 ucontext32_t *ucp; in getsetcontext32() local
341 ucp = arg; in getsetcontext32()
342 if (ucp == NULL) in getsetcontext32()
344 if (copyin(ucp, &uc, sizeof (uc) - in getsetcontext32()
352 copyin(&ucp->uc_mcontext.fpregs, &uc.uc_mcontext.fpregs, in getsetcontext32()