Lines Matching refs:lwp

60 	klwp_t *lwp = ttolwp(curthread);  in savecontext()  local
82 ucp->uc_link = (ucontext_t *)lwp->lwp_oldcontext; in savecontext()
90 if (lwp->lwp_ustack == (uintptr_t)NULL || in savecontext()
91 copyin((void *)lwp->lwp_ustack, &ucp->uc_stack, in savecontext()
95 if (lwp->lwp_sigaltstack.ss_flags == SS_ONSTACK) { in savecontext()
96 ucp->uc_stack = lwp->lwp_sigaltstack; 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()
124 klwp_t *lwp = ttolwp(t); in restorecontext() local
126 model_t model = lwp_getdatamodel(lwp); in restorecontext()
129 if (lwp->lwp_pcb.pcb_xregstat != XREGNONE) in restorecontext()
130 xregrestore(lwp, 0); in restorecontext()
132 lwp->lwp_oldcontext = (uintptr_t)ucp->uc_link; in restorecontext()
136 lwp->lwp_sigaltstack = ucp->uc_stack; in restorecontext()
138 lwp->lwp_sigaltstack.ss_flags &= ~SS_ONSTACK; in restorecontext()
143 setgwins(lwp, mcp->gwins); in restorecontext()
144 setgregs(lwp, mcp->gregs); in restorecontext()
146 setasrs(lwp, mcp->asrs); in restorecontext()
148 xregs_setgregs(lwp, xregs_getptr(lwp, ucp)); in restorecontext()
154 setfpregs(lwp, fp); in restorecontext()
156 setfpasrs(lwp, mcp->asrs); in restorecontext()
158 xregs_setfpregs(lwp, xregs_getptr(lwp, ucp)); in restorecontext()
159 run_fpq(lwp, fp); in restorecontext()
186 klwp_t *lwp = ttolwp(curthread); in getsetcontext() local
304 xregs_clrptr(lwp, &uc); in getsetcontext()
315 if ((uc.uc_flags & UC_STACK) && (lwp->lwp_ustack != 0)) { in getsetcontext()
316 (void) copyout(&uc.uc_stack, (stack_t *)lwp->lwp_ustack, in getsetcontext()
332 if (copyout(&lwp->lwp_ustack, arg, sizeof (caddr_t))) in getsetcontext()
341 lwp->lwp_ustack = (uintptr_t)arg; in getsetcontext()
357 klwp_t *lwp = ttolwp(curthread); in savecontext32() local
379 ucp->uc_link = (caddr32_t)lwp->lwp_oldcontext; in savecontext32()
387 if (lwp->lwp_ustack == (uintptr_t)NULL || in savecontext32()
388 copyin((void *)lwp->lwp_ustack, &ucp->uc_stack, in savecontext32()
392 if (lwp->lwp_sigaltstack.ss_flags == SS_ONSTACK) { in savecontext32()
394 (caddr32_t)(uintptr_t)lwp->lwp_sigaltstack.ss_sp; in savecontext32()
396 (size32_t)lwp->lwp_sigaltstack.ss_size; in savecontext32()
407 getgregs32(lwp, ucp->uc_mcontext.gregs); in savecontext32()
408 getfpregs(lwp, &fpregs); in savecontext32()
434 klwp_t *lwp = ttolwp(curthread); in getsetcontext32() local
556 if (xregs_hasptr32(lwp, &uc) && in getsetcontext32()
559 if (copyin((void *)(uintptr_t)xregs_getptr32(lwp, &uc), in getsetcontext32()
566 xregs_setptr(lwp, &ucnat, xregs); in getsetcontext32()
568 xregs_clrptr(lwp, &ucnat); in getsetcontext32()
573 if ((uc.uc_flags & UC_STACK) && (lwp->lwp_ustack != 0)) { in getsetcontext32()
575 (stack32_t *)lwp->lwp_ustack, sizeof (stack32_t)); in getsetcontext32()
579 setgwins32(lwp, gwin); in getsetcontext32()
593 ustack32 = (uint32_t)lwp->lwp_ustack; in getsetcontext32()
603 lwp->lwp_ustack = (uintptr_t)arg; in getsetcontext32()