Lines Matching refs:lwp

100 	klwp_t *lwp = ttolwp(curthread);  in savecontext()  local
101 struct regs *rp = lwptoregs(lwp); in savecontext()
137 ucp->uc_link = (struct ucontext *)lwp->lwp_oldcontext; in savecontext()
145 if (lwp->lwp_ustack == (uintptr_t)NULL || in savecontext()
146 copyin((void *)lwp->lwp_ustack, &ucp->uc_stack, in savecontext()
150 if (lwp->lwp_sigaltstack.ss_flags == SS_ONSTACK) { in savecontext()
151 ucp->uc_stack = lwp->lwp_sigaltstack; in savecontext()
163 if ((rp->r_ps & PS_T) || (lwp->lwp_pcb.pcb_flags & REQUEST_STEP)) { in savecontext()
170 if (!(lwp->lwp_pcb.pcb_flags & REQUEST_NOSTEP)) { in savecontext()
171 lwp->lwp_pcb.pcb_flags |= DEBUG_PENDING; in savecontext()
190 getgregs(lwp, ucp->uc_mcontext.gregs); in savecontext()
191 fpu_en = (lwp->lwp_pcb.pcb_fpu.fpu_flags & FPU_EN) != 0; in savecontext()
193 getfpregs(lwp, &ucp->uc_mcontext.fpregs); 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()
236 klwp_t *lwp = ttolwp(t); in restorecontext() local
238 lwp->lwp_oldcontext = (uintptr_t)ucp->uc_link; in restorecontext()
242 lwp->lwp_sigaltstack = ucp->uc_stack; in restorecontext()
244 lwp->lwp_sigaltstack.ss_flags &= ~SS_ONSTACK; in restorecontext()
254 if (lwptoregs(lwp)->r_ps & PS_T) in restorecontext()
255 lwp->lwp_pcb.pcb_flags |= DEBUG_PENDING; in restorecontext()
256 setgregs(lwp, ucp->uc_mcontext.gregs); in restorecontext()
257 lwp->lwp_eosys = JUSTRETURN; in restorecontext()
270 fpu_set_xsave(lwp, (const void *)ucp->uc_xsave); in restorecontext()
272 setfpregs(lwp, &ucp->uc_mcontext.fpregs); in restorecontext()
293 klwp_t *lwp = ttolwp(curthread); in getsetcontext() local
382 ret = fpu_signal_copyin(lwp, &uc); in getsetcontext()
390 if ((uc.uc_flags & UC_STACK) && (lwp->lwp_ustack != 0)) in getsetcontext()
391 (void) copyout(&uc.uc_stack, (stack_t *)lwp->lwp_ustack, in getsetcontext()
396 if (copyout(&lwp->lwp_ustack, arg, sizeof (caddr_t))) in getsetcontext()
403 lwp->lwp_ustack = (uintptr_t)arg; in getsetcontext()
418 klwp_t *lwp = ttolwp(curthread); in savecontext32() local
419 struct regs *rp = lwptoregs(lwp); in savecontext32()
442 ucp->uc_link = (caddr32_t)lwp->lwp_oldcontext; in savecontext32()
444 if (lwp->lwp_ustack == (uintptr_t)NULL || in savecontext32()
445 copyin((void *)lwp->lwp_ustack, &ucp->uc_stack, in savecontext32()
449 if (lwp->lwp_sigaltstack.ss_flags == SS_ONSTACK) { in savecontext32()
451 (caddr32_t)(uintptr_t)lwp->lwp_sigaltstack.ss_sp; in savecontext32()
453 (size32_t)lwp->lwp_sigaltstack.ss_size; in savecontext32()
467 if ((rp->r_ps & PS_T) || (lwp->lwp_pcb.pcb_flags & REQUEST_STEP)) { in savecontext32()
474 if (!(lwp->lwp_pcb.pcb_flags & REQUEST_NOSTEP)) { in savecontext32()
475 lwp->lwp_pcb.pcb_flags |= DEBUG_PENDING; in savecontext32()
483 getgregs32(lwp, ucp->uc_mcontext.gregs); in savecontext32()
484 fpu_en = (lwp->lwp_pcb.pcb_fpu.fpu_flags & FPU_EN) != 0; in savecontext32()
486 getfpregs32(lwp, &ucp->uc_mcontext.fpregs); in savecontext32()
508 ret = fpu_signal_copyout(lwp, uaddr, savecontext_copyout); in savecontext32()
510 ret = fpu_signal_copyout(lwp, uaddr, copyout); in savecontext32()
522 klwp_t *lwp = ttolwp(curthread); in getsetcontext32() local
587 int ret = fpu_signal_copyin(lwp, &ucnat); in getsetcontext32()
595 if ((uc.uc_flags & UC_STACK) && (lwp->lwp_ustack != 0)) in getsetcontext32()
597 (stack32_t *)lwp->lwp_ustack, sizeof (uc.uc_stack)); in getsetcontext32()
601 ustack32 = (caddr32_t)lwp->lwp_ustack; in getsetcontext32()
609 lwp->lwp_ustack = (uintptr_t)arg; in getsetcontext32()