Lines Matching refs:lwp
86 setfpregs(klwp_t *lwp, fpregset_t *fp) in setfpregs() argument
91 model_t model = lwp_getdatamodel(lwp); in setfpregs()
93 mpcb = lwptompcb(lwp); in setfpregs()
94 pfp = lwptofpu(lwp); in setfpregs()
151 if (lwp != ttolwp(curthread)) { in setfpregs()
194 if (lwp == ttolwp(curthread)) in setfpregs()
204 setfpregs32(klwp_t *lwp, fpregset32_t *fp) in setfpregs32() argument
209 setfpregs(lwp, &fpregs); in setfpregs32()
218 run_fpq(klwp_t *lwp, fpregset_t *fp) in run_fpq() argument
226 if (lwp == ttolwp(curthread)) { in run_fpq()
229 fp_runq(lwp->lwp_regs); in run_fpq()
240 getfpregs(klwp_t *lwp, fpregset_t *fp) in getfpregs() argument
243 model_t model = lwp_getdatamodel(lwp); in getfpregs()
245 pfp = lwptofpu(lwp); in getfpregs()
247 if (fpu_exists && ttolwp(curthread) == lwp) in getfpregs()
269 if (fpu_exists && ttolwp(curthread) == lwp) { in getfpregs()
311 getfpregs32(klwp_t *lwp, fpregset32_t *fp) in getfpregs32() argument
315 getfpregs(lwp, &fpregs); in getfpregs32()
328 setgregs(klwp_t *lwp, gregset_t grp) in setgregs() argument
330 struct regs *rp = lwptoregs(lwp); in setgregs()
331 kfpu_t *fp = lwptofpu(lwp); in setgregs()
334 int current = (lwp == curthread->t_lwp); in setgregs()
381 lwp->lwp_eosys = JUSTRETURN; in setgregs()
392 getgregs(klwp_t *lwp, gregset_t grp) in getgregs() argument
394 struct regs *rp = lwptoregs(lwp); in getgregs()
398 if (fpu_exists && ttolwp(curthread) == lwp) { in getgregs()
401 kfpu_t *fp = lwptofpu(lwp); in getgregs()
429 getgregs32(klwp_t *lwp, gregset32_t grp) in getgregs32() argument
431 struct regs *rp = lwptoregs(lwp); in getgregs32()
435 if (fpu_exists && ttolwp(curthread) == lwp) { in getgregs32()
438 kfpu_t *fp = lwptofpu(lwp); in getgregs32()
477 setgwins(klwp_t *lwp, gwindows_t *gwins) in setgwins() argument
479 struct machpcb *mpcb = lwptompcb(lwp); in setgwins()
510 setgwins32(klwp_t *lwp, gwindows32_t *gwins) in setgwins32() argument
512 struct machpcb *mpcb = lwptompcb(lwp); in setgwins32()
550 getgwins(klwp_t *lwp, gwindows_t *gwp) in getgwins() argument
552 struct machpcb *mpcb = lwptompcb(lwp); in getgwins()
582 getgwins32(klwp_t *lwp, gwindows32_t *gwp) in getgwins32() argument
584 struct machpcb *mpcb = lwptompcb(lwp); in getgwins32()
722 klwp_t *lwp = ttolwp(curthread); in copy_return_window32() local
723 struct machpcb *mpcb = lwptompcb(lwp); in copy_return_window32()
739 caddr32_t sp1_32 = (uint32_t)lwptoregs(lwp)->r_sp; in copy_return_window32()
762 klwp_t *lwp; in copy_return_window() local
770 lwp = ttolwp(curthread); in copy_return_window()
771 mpcb = lwptompcb(lwp); in copy_return_window()
774 sp1 = (caddr_t)lwptoregs(lwp)->r_sp + STACK_BIAS; in copy_return_window()
797 klwp_t *lwp = ttolwp(curthread); in setregs() local
798 kfpu_t *fpp = lwptofpu(lwp); in setregs()
799 struct machpcb *mpcb = lwptompcb(lwp); in setregs()
806 rp = lwptoregs(lwp); in setregs()
821 lwp->lwp_eosys = JUSTRETURN; in setregs()
822 lwp->lwp_pcb.pcb_trap0addr = 0; /* no trap 0 handler */ in setregs()
892 klwp_t *lwp = ttolwp(curthread); in sendsig() local
918 if (lwp->lwp_pcb.pcb_xregstat != XREGNONE) in sendsig()
919 xregrestore(lwp, 0); in sendsig()
921 mpcb = lwptompcb(lwp); in sendsig()
922 rp = lwptoregs(lwp); in sendsig()
944 fpp = lwptofpu(lwp); in sendsig()
951 mpcb = lwptompcb(lwp); in sendsig()
972 !(lwp->lwp_sigaltstack.ss_flags & (SS_ONSTACK|SS_DISABLE))); in sendsig()
984 (SA((uintptr_t)lwp->lwp_sigaltstack.ss_sp) + in sendsig()
985 SA((int)lwp->lwp_sigaltstack.ss_size) - STACK_ALIGN - in sendsig()
995 !(lwp->lwp_sigaltstack.ss_flags & SS_ONSTACK)) in sendsig()
1025 savecontext(tuc, &lwp->lwp_sigoldmask); in sendsig()
1031 xregs_setptr(lwp, tuc, sp); in sendsig()
1033 xregs_get(lwp, xregs); in sendsig()
1076 (ulong_t)lwp->lwp_arg[i]); in sendsig()
1092 getgwins(lwp, gwp); in sendsig()
1140 lwp->lwp_oldcontext = (uintptr_t)&fp->uc; in sendsig()
1143 lwp->lwp_sigaltstack.ss_flags |= SS_ONSTACK; in sendsig()
1145 if (lwp->lwp_ustack) { in sendsig()
1146 copyout_noerr(&lwp->lwp_sigaltstack, in sendsig()
1147 (stack_t *)lwp->lwp_ustack, sizeof (stack_t)); in sendsig()
1221 klwp_t *lwp = ttolwp(curthread); in sendsig32() local
1249 if (lwp->lwp_pcb.pcb_xregstat != XREGNONE) in sendsig32()
1250 xregrestore(lwp, 0); in sendsig32()
1252 mpcb = lwptompcb(lwp); in sendsig32()
1253 rp = lwptoregs(lwp); in sendsig32()
1271 fpp = lwptofpu(lwp); in sendsig32()
1279 mpcb = lwptompcb(lwp); in sendsig32()
1301 !(lwp->lwp_sigaltstack.ss_flags & (SS_ONSTACK|SS_DISABLE))); in sendsig32()
1313 (SA32((uintptr_t)lwp->lwp_sigaltstack.ss_sp) + in sendsig32()
1314 SA32((int)lwp->lwp_sigaltstack.ss_size) - in sendsig32()
1325 !(lwp->lwp_sigaltstack.ss_flags & SS_ONSTACK)) in sendsig32()
1355 savecontext32(tuc, &lwp->lwp_sigoldmask, dfq); in sendsig32()
1361 xregs_setptr32(lwp, tuc, (caddr32_t)(uintptr_t)sp); in sendsig32()
1363 xregs_get(lwp, xregs); in sendsig32()
1404 (uint32_t)lwp->lwp_arg[i]); in sendsig32()
1420 getgwins32(lwp, gwp); in sendsig32()
1476 lwp->lwp_oldcontext = (uintptr_t)&fp->uc; in sendsig32()
1479 lwp->lwp_sigaltstack.ss_flags |= SS_ONSTACK; in sendsig32()
1480 if (lwp->lwp_ustack) { in sendsig32()
1484 (caddr32_t)(uintptr_t)lwp->lwp_sigaltstack.ss_sp; in sendsig32()
1485 stk32.ss_size = (size32_t)lwp->lwp_sigaltstack.ss_size; in sendsig32()
1486 stk32.ss_flags = (int32_t)lwp->lwp_sigaltstack.ss_flags; in sendsig32()
1488 copyout_noerr(&stk32, (stack32_t *)lwp->lwp_ustack, in sendsig32()
1550 lwp_load(klwp_t *lwp, gregset_t grp, uintptr_t thrptr) in lwp_load() argument
1552 setgregs(lwp, grp); in lwp_load()
1553 if (lwptoproc(lwp)->p_model == DATAMODEL_ILP32) in lwp_load()
1554 lwptoregs(lwp)->r_tstate = TSTATE_USER32 | TSTATE_MM_TSO; in lwp_load()
1556 lwptoregs(lwp)->r_tstate = TSTATE_USER64 | TSTATE_MM_TSO; in lwp_load()
1559 lwptoregs(lwp)->r_tstate &= ~TSTATE_PEF; in lwp_load()
1560 lwp->lwp_eosys = JUSTRETURN; in lwp_load()
1561 lwptot(lwp)->t_post_sys = 1; in lwp_load()
1568 lwp_setrval(klwp_t *lwp, int v1, int v2) in lwp_setrval() argument
1570 struct regs *rp = lwptoregs(lwp); in lwp_setrval()
1581 lwp_setsp(klwp_t *lwp, caddr_t sp) in lwp_setsp() argument
1583 struct regs *rp = lwptoregs(lwp); in lwp_setsp()
1596 klwp_t *lwp = ttolwp(curthread); in lwp_pcb_exit() local
1598 if (lwp->lwp_pcb.pcb_flags & ASYNC_HWERR) { in lwp_pcb_exit()
1599 lwp->lwp_pcb.pcb_flags &= ~ASYNC_HWERR; in lwp_pcb_exit()