Home
last modified time | relevance | path

Searched refs:lwp (Results 1 – 25 of 153) sorted by relevance

1234567

/illumos-gate/usr/src/uts/sparc/fs/proc/
H A Dprmachdep.c93 prgetprregs(klwp_t *lwp, prgregset_t prp) in prgetprregs() argument
97 ASSERT(MUTEX_NOT_HELD(&lwptoproc(lwp)->p_lock)); in prgetprregs()
99 getgregs(lwp, gr); in prgetprregs()
123 if (lwp->lwp_pcb.pcb_xregstat != XREGNONE) { in prgetprregs()
124 prp[R_L0] = lwp->lwp_pcb.pcb_xregs.rw_local[0]; in prgetprregs()
125 prp[R_L1] = lwp->lwp_pcb.pcb_xregs.rw_local[1]; in prgetprregs()
126 prp[R_L2] = lwp->lwp_pcb.pcb_xregs.rw_local[2]; in prgetprregs()
127 prp[R_L3] = lwp->lwp_pcb.pcb_xregs.rw_local[3]; in prgetprregs()
128 prp[R_L4] = lwp->lwp_pcb.pcb_xregs.rw_local[4]; in prgetprregs()
129 prp[R_L5] = lwp->lwp_pcb.pcb_xregs.rw_local[5]; in prgetprregs()
[all …]
/illumos-gate/usr/src/uts/sparc/os/
H A Dsyscall.c71 lwp_getsysent(klwp_t *lwp) in lwp_getsysent() argument
73 if (lwp_getdatamodel(lwp) == DATAMODEL_NATIVE) in lwp_getsysent()
77 #define LWP_GETSYSENT(lwp) (lwp_getsysent(lwp)) argument
79 #define LWP_GETSYSENT(lwp) (sysent) argument
89 xregrestore(klwp_t *lwp, int shared) in xregrestore() argument
95 if (lwp->lwp_pcb.pcb_xregstat == XREGMODIFIED) { in xregrestore()
96 struct machpcb *mpcb = lwptompcb(lwp); in xregrestore()
97 caddr_t sp = (caddr_t)lwptoregs(lwp)->r_sp; in xregrestore()
103 if (lwp_getdatamodel(lwp) == DATAMODEL_LP64) { in xregrestore()
115 (void) copyout_nowatch(&lwp->lwp_pcb.pcb_xregs, in xregrestore()
[all …]
/illumos-gate/usr/src/uts/intel/os/
H A Dsyscall.c76 #define LWP_GETSYSENT(lwp) \ argument
77 (lwp_getdatamodel(lwp) == DATAMODEL_NATIVE ? sysent : sysent32)
79 #define LWP_GETSYSENT(lwp) (sysent) argument
143 klwp_t *lwp = ttolwp(t); in syscall_entry() local
144 struct regs *rp = lwptoregs(lwp); in syscall_entry()
147 struct sysent *se = LWP_GETSYSENT(lwp); in syscall_entry()
153 lwp->lwp_ru.sysc++; in syscall_entry()
154 lwp->lwp_eosys = NORMALRETURN; /* assume this will be normal */ in syscall_entry()
165 lwp->lwp_ap = argp; /* for get_syscall_args */ in syscall_entry()
210 klwp_t *lwp = ttolwp(t); in syscall_exit() local
[all …]
H A Dsundep.c309 lwp_load(klwp_t *lwp, gregset_t grp, uintptr_t thrptr) in lwp_load() argument
311 struct regs *rp = lwptoregs(lwp); in lwp_load()
313 setgregs(lwp, grp); in lwp_load()
330 if (lwp_getdatamodel(lwp) == DATAMODEL_ILP32) { in lwp_load()
332 (void) lwp_setprivate(lwp, _LWP_GSBASE, thrptr); in lwp_load()
352 (void) lwp_setprivate(lwp, _LWP_FSBASE, in lwp_load()
356 (void) lwp_setprivate(lwp, _LWP_GSBASE, in lwp_load()
361 (void) lwp_setprivate(lwp, _LWP_GSBASE, thrptr); in lwp_load()
364 lwp->lwp_eosys = JUSTRETURN; in lwp_load()
365 lwptot(lwp)->t_post_sys = 1; in lwp_load()
[all …]
H A Dsendsig.c144 klwp_t *lwp = ttolwp(curthread); in sendsig() local
160 rp = lwptoregs(lwp); in sendsig()
190 xsave_size = SA(fpu_signal_size(lwp)); in sendsig()
205 !(lwp->lwp_sigaltstack.ss_flags & (SS_ONSTACK|SS_DISABLE)); in sendsig()
208 fp = (caddr_t)(SA((uintptr_t)lwp->lwp_sigaltstack.ss_sp) + in sendsig()
209 SA(lwp->lwp_sigaltstack.ss_size) - STACK_ALIGN); in sendsig()
293 (ulong_t)lwp->lwp_arg[i]); in sendsig()
317 ret = savecontext(tuc, &lwp->lwp_sigoldmask, SAVECTXT_F_EXTD | in sendsig()
327 lwp->lwp_oldcontext = (uintptr_t)uc; in sendsig()
330 lwp->lwp_sigaltstack.ss_flags |= SS_ONSTACK; in sendsig()
[all …]
/illumos-gate/usr/src/uts/intel/fs/proc/
H A Dprmachdep.c99 prgetprregs(klwp_t *lwp, prgregset_t prp) in prgetprregs() argument
101 ASSERT(MUTEX_NOT_HELD(&lwptoproc(lwp)->p_lock)); in prgetprregs()
103 getgregs(lwp, prp); in prgetprregs()
111 prsetprregs(klwp_t *lwp, prgregset_t prp, int initial) in prsetprregs() argument
114 lwptoregs(lwp)->r_ps = PSL_USER; in prsetprregs()
115 (void) setgregs(lwp, prp); in prsetprregs()
124 prgregset_32ton(klwp_t *lwp, prgregset32_t src, prgregset_t dst) in prgregset_32ton() argument
126 struct regs *rp = lwptoregs(lwp); in prgregset_32ton()
128 dst[REG_GSBASE] = lwp->lwp_pcb.pcb_gsbase; in prgregset_32ton()
129 dst[REG_FSBASE] = lwp->lwp_pcb.pcb_fsbase; in prgregset_32ton()
[all …]
/illumos-gate/usr/src/cmd/mdb/common/modules/lofs/
H A Dlofs.c44 lnode_walk_t *lwp; in lnode_walk_init() local
59 lwp = mdb_alloc(sizeof (lnode_walk_t), UM_SLEEP); in lnode_walk_init()
62 lwp->lw_tabsz = 0; in lnode_walk_init()
65 mdb_free(lwp, sizeof (lnode_walk_t)); in lnode_walk_init()
78 lwp->lw_tabsz += loinfo.li_htsize; in lnode_walk_init()
82 if (lwp->lw_tabsz == 0) { in lnode_walk_init()
86 mdb_free(lwp, sizeof (lnode_walk_t)); in lnode_walk_init()
89 lwp->lw_table = mdb_alloc(lwp->lw_tabsz * in lnode_walk_init()
102 if (htsize + loinfo.li_htsize > lwp->lw_tabsz) { in lnode_walk_init()
106 mdb_free(lwp->lw_table, in lnode_walk_init()
[all …]
/illumos-gate/usr/src/cmd/prstat/
H A Dprstat.c357 lwp_info_t *lwp; in list_print() local
508 lwp = list->l_ptrs[i]; in list_print()
510 format_name(lwp, name, sizeof (name)); in list_print()
512 pwd_getname(lwp->li_info.pr_uid, pname, sizeof (pname), in list_print()
518 Format_size(psize, lwp->li_info.pr_size, 6); in list_print()
519 Format_size(prssize, lwp->li_info.pr_rssize, 6); in list_print()
521 lwp->li_info.pr_lwp.pr_sname, in list_print()
522 lwp->li_info.pr_lwp.pr_onpro, 7); in list_print()
523 if (strcmp(lwp->li_info.pr_lwp.pr_clname, in list_print()
525 strcmp(lwp->li_info.pr_lwp.pr_clname, in list_print()
[all …]
H A Dprsort.c60 get_cpu_from_psinfo(void *lwp) in get_cpu_from_psinfo() argument
63 FRC2PCT((((lwp_info_t *)lwp)->li_info.pr_lwp.pr_pctcpu)*1000)); in get_cpu_from_psinfo()
67 get_cpu_from_usage(void *lwp) in get_cpu_from_usage() argument
69 lwp_info_t *p = (lwp_info_t *)lwp; in get_cpu_from_usage()
78 get_time(void *lwp) in get_time() argument
80 return ((ulong_t)TIME2SEC(((lwp_info_t *)lwp)->li_info.pr_lwp.pr_time)); in get_time()
84 get_size(void *lwp) in get_size() argument
86 return ((ulong_t)((lwp_info_t *)lwp)->li_info.pr_size); in get_size()
90 get_rssize(void *lwp) in get_rssize() argument
92 return ((ulong_t)((lwp_info_t *)lwp)->li_info.pr_rssize); in get_rssize()
[all …]
/illumos-gate/usr/src/uts/intel/syscall/
H A Dgetcontext.c100 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()
[all …]
H A Dlwp_private.c40 lwp_setprivate(klwp_t *lwp, int which, uintptr_t base) in lwp_setprivate() argument
42 pcb_t *pcb = &lwp->lwp_pcb; in lwp_setprivate()
43 struct regs *rp = lwptoregs(lwp); in lwp_setprivate()
44 kthread_t *t = lwptot(lwp); in lwp_setprivate()
85 if (lwp_getdatamodel(lwp) == DATAMODEL_NATIVE) { in lwp_setprivate()
100 if (lwp_getdatamodel(lwp) == DATAMODEL_NATIVE) { in lwp_setprivate()
125 lwp_getprivate(klwp_t *lwp, int which, uintptr_t base) in lwp_getprivate() argument
127 pcb_t *pcb = &lwp->lwp_pcb; in lwp_getprivate()
128 struct regs *rp = lwptoregs(lwp); in lwp_getprivate()
132 ASSERT(lwptot(lwp) == curthread); in lwp_getprivate()
[all …]
/illumos-gate/usr/src/uts/sparc/syscall/
H A Dgetcontext.c60 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()
[all …]
/illumos-gate/usr/src/lib/libproc/common/
H A DPlwpregs.c62 lwp_info_t *lwp; in getlwpcore() local
64 for (lwp = list_head(&core->core_lwp_head); lwp != NULL; in getlwpcore()
65 lwp = list_next(&core->core_lwp_head, lwp)) { in getlwpcore()
66 if (lwp->lwp_id == lwpid) in getlwpcore()
67 return (lwp); in getlwpcore()
166 lwp_info_t *lwp; in getlwpstatus() local
190 if (P->data != NULL && (lwp = getlwpcore(P, lwpid)) != NULL) { in getlwpstatus()
191 (void) memcpy(lps, &lwp->lwp_status, sizeof (lwpstatus_t)); in getlwpstatus()
417 lwp_info_t *lwp; in Plwp_getxregs() local
434 if ((lwp = getlwpcore(P, lwpid)) != NULL && lwp->lwp_xregs != NULL && in Plwp_getxregs()
[all …]
H A DPcore.c210 lwp_info_t *lwp; in Pfini_core() local
212 while ((lwp = list_remove_head(&core->core_lwp_head)) != NULL) { in Pfini_core()
214 if (lwp->lwp_gwins != NULL) in Pfini_core()
215 free(lwp->lwp_gwins); in Pfini_core()
216 if (lwp->lwp_xregs != NULL) in Pfini_core()
217 free(lwp->lwp_xregs); in Pfini_core()
218 if (lwp->lwp_asrs != NULL) in Pfini_core()
219 free(lwp->lwp_asrs); in Pfini_core()
221 free(lwp); in Pfini_core()
366 lwp_info_t *lwp, *prev; in lwpid2info() local
[all …]
/illumos-gate/usr/src/uts/sparc/v9/os/
H A Dv9dep.c86 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()
[all …]
H A Dxregs.c54 xregs_clrptr(klwp_id_t lwp, ucontext_t *uc) in xregs_clrptr() argument
66 xregs_hasptr(klwp_id_t lwp, ucontext_t *uc) in xregs_hasptr() argument
76 xregs_getptr(klwp_id_t lwp, ucontext_t *uc) in xregs_getptr() argument
88 xregs_setptr(klwp_id_t lwp, ucontext_t *uc, caddr_t xrp) in xregs_setptr() argument
98 xregs_clrptr32(klwp_id_t lwp, ucontext32_t *uc) in xregs_clrptr32() argument
106 xregs_hasptr32(klwp_id_t lwp, ucontext32_t *uc) in xregs_hasptr32() argument
113 xregs_getptr32(klwp_id_t lwp, ucontext32_t *uc) in xregs_getptr32() argument
122 xregs_setptr32(klwp_id_t lwp, ucontext32_t *uc, caddr32_t xrp) in xregs_setptr32() argument
150 xregs_getgregs(klwp_id_t lwp, caddr_t xrp) in xregs_getgregs() argument
153 struct regs *rp = lwptoregs(lwp); in xregs_getgregs()
[all …]
/illumos-gate/usr/src/uts/common/disp/
H A Dshuttle.c87 klwp_t *lwp = ttolwp(curthread); in shuttle_resume() local
93 if (lwp != NULL) { in shuttle_resume()
94 lwp->lwp_asleep = 1; /* /proc */ in shuttle_resume()
95 lwp->lwp_sysabort = 0; /* /proc */ in shuttle_resume()
96 lwp->lwp_ru.nvcsw++; in shuttle_resume()
162 if (lwp && (ISSIG(curthread, JUSTLOOKING) || in shuttle_resume()
181 klwp_t *lwp = ttolwp(curthread); in shuttle_swtch() local
185 lwp->lwp_asleep = 1; /* /proc */ in shuttle_swtch()
186 lwp->lwp_sysabort = 0; /* /proc */ in shuttle_swtch()
187 lwp->lwp_ru.nvcsw++; in shuttle_swtch()
[all …]
/illumos-gate/usr/src/uts/sun4/os/
H A Dmachdep.c126 lwp_stk_init(klwp_t *lwp, caddr_t stk) in lwp_stk_init() argument
140 lwp->lwp_regs = (void *)&mpcb->mpcb_regs; in lwp_stk_init()
141 lwp->lwp_fpu = (void *)fp; in lwp_stk_init()
144 mpcb->mpcb_thread = lwp->lwp_thread; in lwp_stk_init()
146 if (lwp->lwp_procp->p_model == DATAMODEL_ILP32) { in lwp_stk_init()
160 lwp_stk_fini(klwp_t *lwp) in lwp_stk_fini() argument
162 struct machpcb *mpcb = lwptompcb(lwp); in lwp_stk_fini()
179 lwp_fp_init(klwp_t *lwp) in lwp_fp_init() argument
187 lwp_forkregs(klwp_t *lwp, klwp_t *clwp) in lwp_forkregs() argument
189 kthread_t *t, *pt = lwptot(lwp); in lwp_forkregs()
[all …]
/illumos-gate/usr/src/uts/common/syscall/
H A Drusagesys.c44 klwp_t *lwp; in getrusage() local
70 lwp = ttolwp(t); in getrusage()
72 r.ru_majflt += lwp->lwp_ru.majflt; in getrusage()
73 r.ru_minflt += lwp->lwp_ru.minflt; in getrusage()
74 r.ru_nswap += lwp->lwp_ru.nswap; in getrusage()
75 r.ru_inblock += lwp->lwp_ru.inblock; in getrusage()
76 r.ru_oublock += lwp->lwp_ru.oublock; in getrusage()
77 r.ru_msgsnd += lwp->lwp_ru.msgsnd; in getrusage()
78 r.ru_msgrcv += lwp->lwp_ru.msgrcv; in getrusage()
79 r.ru_nsignals += lwp->lwp_ru.nsignals; in getrusage()
[all …]
H A Dlwp_create.c68 klwp_t *lwp; in syslwp_create() local
122 lwp = lwp_create(lwp_rtt, NULL, 0, curproc, TS_STOPPED, in syslwp_create()
127 if (lwp == NULL) in syslwp_create()
130 lwp_load(lwp, uc.uc_mcontext.gregs, thrptr); in syslwp_create()
132 t = lwptot(lwp); in syslwp_create()
161 lwp_ctmpl_copy(lwp, ttolwp(curthread)); in syslwp_create()
169 lwp->lwp_ap = lwp->lwp_arg; in syslwp_create()
170 lwp->lwp_arg[0] = (long)ucp; in syslwp_create()
171 lwp->lwp_arg[1] = (long)flags; in syslwp_create()
172 lwp->lwp_arg[2] = (long)new_lwp; in syslwp_create()
[all …]
H A Dsigtimedwait.c98 klwp_t *lwp = ttolwp(t); in sigtimedwait() local
172 if (lwp->lwp_cursig == 0 || in sigtimedwait()
173 !sigismember(&t->t_sigwait, lwp->lwp_cursig)) { in sigtimedwait()
184 if (lwp->lwp_curinfo) in sigtimedwait()
185 infop = &lwp->lwp_curinfo->sq_info; in sigtimedwait()
189 infop->si_signo = lwp->lwp_cursig; in sigtimedwait()
193 lwp->lwp_ru.nsignals++; in sigtimedwait()
194 ret = lwp->lwp_cursig; in sigtimedwait()
196 lwp->lwp_cursig = 0; in sigtimedwait()
197 lwp->lwp_extsig = 0; in sigtimedwait()
[all …]
/illumos-gate/usr/src/uts/common/fs/smbclnt/smbfs/
H A Dsmbfs_rwlock.c79 klwp_t *lwp = ttolwp(curthread); in smbfs_rw_enter_sig() local
81 if (lwp != NULL) in smbfs_rw_enter_sig()
82 lwp->lwp_nostop++; in smbfs_rw_enter_sig()
84 if (lwp != NULL) in smbfs_rw_enter_sig()
85 lwp->lwp_nostop--; in smbfs_rw_enter_sig()
89 if (lwp != NULL) in smbfs_rw_enter_sig()
90 lwp->lwp_nostop--; in smbfs_rw_enter_sig()
114 klwp_t *lwp = ttolwp(curthread); in smbfs_rw_enter_sig() local
116 if (lwp != NULL) in smbfs_rw_enter_sig()
117 lwp->lwp_nostop++; in smbfs_rw_enter_sig()
[all …]
/illumos-gate/usr/src/uts/common/os/
H A Dcondvar.c144 klwp_t *lwp = ttolwp(t); in cv_block() local
164 if (lwp != NULL && t->t_intr == NULL) { in cv_block()
165 lwp->lwp_ru.nvcsw++; in cv_block()
310 klwp_t *lwp = ttolwp(t); in cv_wait_sig() local
324 if (lwp == NULL || (p->p_flag & SSYS)) { in cv_wait_sig()
332 lwp->lwp_asleep = 1; in cv_wait_sig()
333 lwp->lwp_sysabort = 0; in cv_wait_sig()
345 if (ISSIG_PENDING(t, lwp, p)) { in cv_wait_sig()
351 if (lwp->lwp_sysabort || MUSTRETURN(p, t)) in cv_wait_sig()
357 lwp->lwp_asleep = 0; in cv_wait_sig()
[all …]
H A Dmsacct.c98 klwp_t *lwp; in init_mstate() local
104 if ((lwp = ttolwp(t)) != NULL) { in init_mstate()
105 ms = &lwp->lwp_mstate; in init_mstate()
250 klwp_t *lwp; in mstate_thread_onproc_time() local
255 if ((lwp = ttolwp(t)) == NULL) in mstate_thread_onproc_time()
260 ms = &lwp->lwp_mstate; in mstate_thread_onproc_time()
356 klwp_t *lwp; in mstate_aggr_state() local
378 lwp = ttolwp(t); in mstate_aggr_state()
379 ms = &lwp->lwp_mstate; in mstate_aggr_state()
402 klwp_t *lwp; in syscall_mstate() local
[all …]
/illumos-gate/usr/src/cmd/mdb/intel/modules/genunix/
H A Dgcore_isadep.c30 gcore_prfetchinstr(mdb_klwp_t *lwp, ulong_t *ip) in gcore_prfetchinstr() argument
32 *ip = (ulong_t)(instr_t)lwp->lwp_pcb.pcb_instr; in gcore_prfetchinstr()
33 return (lwp->lwp_pcb.pcb_flags & INSTR_VALID); in gcore_prfetchinstr()
37 gcore_prisstep(mdb_klwp_t *lwp) in gcore_prisstep() argument
39 return ((lwp->lwp_pcb.pcb_flags & in gcore_prisstep()
44 gcore_getgregs(mdb_klwp_t *lwp, gregset_t grp) in gcore_getgregs() argument
49 if (mdb_vread(&rgs, sizeof (rgs), lwp->lwp_regs) != sizeof (rgs)) { in gcore_getgregs()
50 mdb_warn("Failed to read regs from %p\n", lwp->lwp_regs); in gcore_getgregs()
56 struct pcb *pcb = &lwp->lwp_pcb; in gcore_getgregs()
99 gcore_prgetrvals(mdb_klwp_t *lwp, long *rval1, long *rval2) in gcore_prgetrvals() argument
[all …]

1234567