Lines Matching defs:lwp
110 * Initialize lwp's kernel stack.
125 lwp_stk_init(klwp_t *lwp, caddr_t stk)
139 lwp->lwp_regs = (void *)&mpcb->mpcb_regs;
140 lwp->lwp_fpu = (void *)fp;
143 mpcb->mpcb_thread = lwp->lwp_thread;
145 if (lwp->lwp_procp->p_model == DATAMODEL_ILP32) {
159 lwp_stk_fini(klwp_t *lwp)
161 struct machpcb *mpcb = lwptompcb(lwp);
181 lwp_forkregs(klwp_t *lwp, klwp_t *clwp)
183 kthread_t *t, *pt = lwptot(lwp);
185 struct machpcb *pmpcb = lwptompcb(lwp);
186 kfpu_t *fp, *pfp = lwptofpu(lwp);
202 bcopy(lwp->lwp_regs, clwp->lwp_regs, sizeof (struct machpcb) - REGOFF);
208 * It is theoretically possibly for the lwp's wstate to
211 * Here, we took on the data model of the cloned lwp.
244 gsr = get_gsr(lwp->lwp_fpu);
247 fp_fork(lwp, clwp);
252 * Free lwp fpu regs.
255 lwp_freeregs(klwp_t *lwp, int isexec)
257 kfpu_t *fp = lwptofpu(lwp);
259 if (lwptot(lwp) == curthread)
270 lwp_attach_brand_hdlrs(klwp_t *lwp)
275 lwp_detach_brand_hdlrs(klwp_t *lwp)
280 * specified lwp's platform-dependent non-floating-point extra
285 xregs_getgfiller(klwp_id_t lwp, caddr_t xrp)
291 * fill in the extra register state area specified with the specified lwp's
293 * NOTE: 'lwp' might not correspond to 'curthread' since this is
294 * called from code in /proc to get the registers of another lwp.
297 xregs_getfpfiller(klwp_id_t lwp, caddr_t xrp)
300 kfpu_t *fp = lwptofpu(lwp);
306 * the lwp area, so do it now
309 if (ttolwp(curthread) == lwp && fpu_exists) {
323 * set the specified lwp's platform-dependent non-floating-point
328 xregs_setgfiller(klwp_id_t lwp, caddr_t xrp)
334 * set the specified lwp's platform-dependent floating-point
338 xregs_setfpfiller(klwp_id_t lwp, caddr_t xrp)
341 kfpu_t *fp = lwptofpu(lwp);
346 set_gsr(gsr, lwptofpu(lwp));
348 if ((lwp == ttolwp(curthread)) && fpu_exists) {
354 restore_gsr(lwptofpu(lwp));
360 * fill in the sun4u asrs, ie, the lwp's platform-dependent
365 getasrs(klwp_t *lwp, asrset_t asr)
371 * fill in the sun4u asrs, ie, the lwp's platform-dependent
375 getfpasrs(klwp_t *lwp, asrset_t asr)
377 kfpu_t *fp = lwptofpu(lwp);
381 if (ttolwp(curthread) == lwp)
384 if (fpu_exists && ttolwp(curthread) == lwp) {
397 * set the sun4u asrs, ie, the lwp's platform-dependent
402 setasrs(klwp_t *lwp, asrset_t asr)
408 setfpasrs(klwp_t *lwp, asrset_t asr)
410 kfpu_t *fp = lwptofpu(lwp);
414 if (ttolwp(curthread) == lwp)
418 if (fpu_exists && ttolwp(curthread) == lwp) {