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