Home
last modified time | relevance | path

Searched refs:curthread (Results 1 – 25 of 487) sorted by relevance

12345678910>>...20

/illumos-gate/usr/src/uts/common/disp/
H A Dshuttle.c87 klwp_t *lwp = ttolwp(curthread); in shuttle_resume()
91 thread_lock(curthread); in shuttle_resume()
98 curthread->t_flag |= T_WAKEABLE; in shuttle_resume()
99 curthread->t_sobj_ops = &shuttle_sobj_ops; in shuttle_resume()
113 curthread->t_wchan0 = (caddr_t)1; in shuttle_resume()
114 CL_INACTIVE(curthread); in shuttle_resume()
117 THREAD_SLEEP(curthread, &shuttle_lock); in shuttle_resume()
123 (void) new_mstate(curthread, LMS_SLEEP); in shuttle_resume()
162 if (lwp && (ISSIG(curthread, JUSTLOOKING) || in shuttle_resume()
163 MUSTRETURN(curproc, curthread) || schedctl_cancel_pending())) in shuttle_resume()
[all …]
/illumos-gate/usr/src/uts/sun4/os/
H A Dtrap.c101 curthread->t_panic_trap = &ti; in die()
141 proc_t *p = ttoproc(curthread); in trap()
142 klwp_id_t lwp = ttolwp(curthread); in trap()
168 ASSERT((curthread->t_schedflag & TS_DONT_SWAP) || in trap()
171 ASSERT(curthread->t_schedflag & TS_DONT_SWAP); in trap()
188 if (curthread->t_cred != p->p_cred) { in trap()
189 cred_t *oldcred = curthread->t_cred; in trap()
195 curthread->t_cred = crgetcred(); in trap()
217 mstate = new_mstate(curthread, mstate); in trap()
304 if (curthread->t_lofault) { in trap()
[all …]
H A Ddtrace_subr.c112 sigaddqa(p, curthread, sqp); in dtrace_pid_probe()
114 aston(curthread); in dtrace_pid_probe()
124 uintptr_t npc = curthread->t_dtrace_npc; in dtrace_return_probe()
125 uint8_t step = curthread->t_dtrace_step; in dtrace_return_probe()
126 uint8_t ret = curthread->t_dtrace_ret; in dtrace_return_probe()
128 if (curthread->t_dtrace_ast) { in dtrace_return_probe()
129 aston(curthread); in dtrace_return_probe()
130 curthread->t_sig_check = 1; in dtrace_return_probe()
136 curthread->t_dtrace_ft = 0; in dtrace_return_probe()
144 tsignal(curthread, SIGILL); in dtrace_return_probe()
[all …]
/illumos-gate/usr/src/cmd/dtrace/test/tst/common/misc/
H A Dtst.roch.d42 /(self->done == 0) && (curthread->t_cpu->cpu_intr_actv == 0) /
46 (long long)curthread, pid, tid,
52 /(self->done == 0) && (curthread->t_cpu->cpu_intr_actv == 0) /
56 (long long) curthread, pid, tid,
64 (long long)curthread, pid, tid);
70 (long long)curthread, pid, tid, (int)arg1, (int)arg0);
76 (long long)curthread, pid, tid, arg0);
82 (long long) curthread, pid, tid, arg0);
/illumos-gate/usr/src/uts/common/syscall/
H A Dsigsuspend.c54 schedctl_finish_sigblock(curthread); in sigsuspend()
55 ttolwp(curthread)->lwp_sigoldmask = curthread->t_hold; in sigsuspend()
56 curthread->t_hold = kset; in sigsuspend()
57 curthread->t_sig_check = 1; /* so post-syscall will re-evaluate */ in sigsuspend()
58 curthread->t_flag |= T_TOMASK; in sigsuspend()
60 while (cv_wait_sig_swap(&curthread->t_delay_cv, &p->p_lock)) in sigsuspend()
H A Dlwp_create.c69 proc_t *p = ttoproc(curthread); in syslwp_create()
86 if (curthread == p->p_agenttp) in syslwp_create()
123 curthread->t_pri, &sigmask, curthread->t_cid, 0); in syslwp_create()
155 if (curthread->t_ctx) in syslwp_create()
156 lwp_createctx(curthread, t); in syslwp_create()
161 lwp_ctmpl_copy(lwp, ttolwp(curthread)); in syslwp_create()
203 proc_t *p = ttoproc(curthread); in syslwp_exit()
H A Dlwpsys.c85 proc_t *p = ttoproc(curthread); in syslwp_suspend()
102 proc_t *p = ttoproc(curthread); in syslwp_continue()
119 proc_t *p = ttoproc(curthread); in lwp_kill()
175 proc_t *p = ttoproc(curthread); in lwp_wait()
177 int daemon = (curthread->t_proc_flag & TP_DAEMON)? 1 : 0; in lwp_wait()
185 if (curthread == p->p_agenttp) in lwp_wait()
191 curthread->t_waitfor = lwpid; in lwp_wait()
228 curthread->t_waitfor = -1; in lwp_wait()
275 curthread->t_waitfor = -1; in lwp_wait()
301 if (t == curthread) { in lwp_wait()
[all …]
H A Dpause.c47 mutex_enter(&curthread->t_delay_lock); in pause()
48 while (cv_wait_sig_swap(&curthread->t_delay_cv, in pause()
49 &curthread->t_delay_lock)) in pause()
51 mutex_exit(&curthread->t_delay_lock); in pause()
/illumos-gate/usr/src/uts/common/os/
H A Dsemaphore.c72 klwp_t *lwp = ttolwp(curthread); \
73 ASSERT(THREAD_LOCK_HELD(curthread)); \
74 ASSERT(curthread != CPU->cpu_idle_thread); \
76 ASSERT(curthread->t_wchan0 == NULL); \
77 ASSERT(curthread->t_wchan == NULL); \
78 ASSERT(curthread->t_state == TS_ONPROC); \
79 CL_SLEEP(curthread); \
80 THREAD_SLEEP(curthread, lockp); \
81 curthread->t_wchan = (caddr_t)s; \
82 curthread->t_sobj_ops = &sema_sobj_ops; \
[all …]
H A Dmain.c160 proc_t *p = ttoproc(curthread); in exec_init()
161 klwp_t *lwp = ttolwp(curthread); in exec_init()
282 curthread->t_post_sys = 1; in exec_init()
283 curthread->t_sysnum = SYS_execve; in exec_init()
290 sigemptyset(&curthread->t_hold); in exec_init()
359 init_mstate(curthread, LMS_SYSTEM); in start_init_common()
383 proc_t *p = ttoproc(curthread); /* &p0 */ in main()
418 ASSERT(curthread == CPU->cpu_thread); in main()
492 ttolwp(curthread)->lwp_error = 0; /* XXX kludge for SCSI driver */ in main()
537 curthread->t_start = PTOU(curproc)->u_start.tv_sec; in main()
[all …]
H A Dturnstile.c245 ASSERT(inheritor == curthread); in turnstile_pi_waive()
265 kthread_t *inheritor = curthread; in turnstile_pi_recalc()
410 kthread_t *t = curthread; in turnstile_block()
456 curthread->t_flag |= T_WAKEABLE; in turnstile_block()
492 if (owner == curthread) { in turnstile_block()
516 setrun(curthread); in turnstile_block()
518 curthread->t_flag &= ~T_WAKEABLE; in turnstile_block()
553 t = curthread; in turnstile_block()
589 t = curthread; in turnstile_block()
609 ushort_t s = curthread->t_oldspl; in turnstile_block()
[all …]
/illumos-gate/usr/src/lib/libc/port/threads/
H A Drwlock.c53 ulwp_t *self = curthread; in rwl_entry()
142 ulwp_t *self = curthread; in rw_read_held()
185 ulwp_t *self = curthread; in rw_write_held()
205 ulwp_t *self = curthread; in rwlock_init()
242 ulwp_t *self = curthread; in rwlock_destroy()
289 ulwp_t *self = curthread; in read_lock_try()
310 ulwp_t *self = curthread; in read_unlock_try()
333 ulwp_t *self = curthread; in write_lock_try()
356 ulwp_t *self = curthread; in write_unlock_try()
480 ulwp_t *self = curthread; in rw_queue_release()
[all …]
H A Dtsd.c51 tsd_metadata_t *tsdm = &curthread->ul_uberdata->tsd_metadata; in thr_keycreate()
185 tsd_metadata_t *tsdm = &curthread->ul_uberdata->tsd_metadata; in pthread_key_delete()
225 return (curthread->ul_ftsd[key]); in pthread_getspecific()
227 if ((stsd = curthread->ul_stsd) != NULL && key < stsd->tsd_nalloc) in pthread_getspecific()
249 *valuep = curthread->ul_ftsd[key]; in thr_getspecific()
250 else if ((stsd = curthread->ul_stsd) != NULL && key < stsd->tsd_nalloc) in thr_getspecific()
267 ulwp_t *self = curthread; in thr_setspecific_slow()
324 ulwp_t *self = curthread; in thr_setspecific()
333 curthread->ul_ftsd[key] = value; in thr_setspecific()
337 if ((stsd = curthread->ul_stsd) != NULL && key < stsd->tsd_nalloc) { in thr_setspecific()
[all …]
H A Dcancel.c38 ulwp_t *self = curthread; in pthread_cancel()
94 ulwp_t *self = curthread; in pthread_setcancelstate()
151 ulwp_t *self = curthread; in pthread_setcanceltype()
205 ulwp_t *self = curthread; in pthread_testcancel()
219 ulwp_t *self = curthread; in _cancelon()
237 ulwp_t *self = curthread; in _canceloff()
255 ulwp_t *self = curthread; in _canceloff_nocancel()
274 ulwp_t *self = curthread; in __pthread_cleanup_push()
292 ulwp_t *self = curthread; in __pthread_cleanup_pop()
395 ulwp_t *self = curthread; in cancel_active()
H A Dsema.c65 curthread->ul_misaligned == 0) in sema_init()
84 ulwp_t *self = curthread; in sema_wait_impl()
203 ASSERT(!curthread->ul_critical || curthread->ul_bindflags); in sema_wait()
216 ASSERT(!curthread->ul_critical || curthread->ul_bindflags); in sema_relclockwait()
232 ASSERT(!curthread->ul_critical || curthread->ul_bindflags); in sema_clockwait()
261 ulwp_t *self = curthread; in sema_trywait()
267 ASSERT(!curthread->ul_critical || curthread->ul_bindflags); in sema_trywait()
328 ulwp_t *self = curthread; in sema_post()
/illumos-gate/usr/src/uts/intel/dtrace/
H A Dfasttrap_isa.c872 if (curthread->t_dtrace_step) { in fasttrap_pid_probe()
873 ASSERT(curthread->t_dtrace_on); in fasttrap_pid_probe()
874 fasttrap_sigtrap(p, curthread, pc); in fasttrap_pid_probe()
881 curthread->t_dtrace_ft = 0; in fasttrap_pid_probe()
882 curthread->t_dtrace_pc = 0; in fasttrap_pid_probe()
883 curthread->t_dtrace_npc = 0; in fasttrap_pid_probe()
884 curthread->t_dtrace_scrpc = 0; in fasttrap_pid_probe()
885 curthread->t_dtrace_astpc = 0; in fasttrap_pid_probe()
886 curthread->t_dtrace_regv = 0; in fasttrap_pid_probe()
1091 fasttrap_sigsegv(p, curthread, rp->r_sp); in fasttrap_pid_probe()
[all …]
/illumos-gate/usr/src/uts/i86pc/os/
H A Ddtrace_subr.c171 if (curthread->t_cred != p->p_cred) { in dtrace_user_probe()
172 cred_t *oldcred = curthread->t_cred; in dtrace_user_probe()
178 curthread->t_cred = crgetcred(); in dtrace_user_probe()
184 uint8_t step = curthread->t_dtrace_step; in dtrace_user_probe()
185 uint8_t ret = curthread->t_dtrace_ret; in dtrace_user_probe()
186 uintptr_t npc = curthread->t_dtrace_npc; in dtrace_user_probe()
188 if (curthread->t_dtrace_ast) { in dtrace_user_probe()
189 aston(curthread); in dtrace_user_probe()
190 curthread->t_sig_check = 1; in dtrace_user_probe()
196 curthread->t_dtrace_ft = 0; in dtrace_user_probe()
[all …]
/illumos-gate/usr/src/lib/libc/port/gen/
H A Datfork.c50 ulwp_t *self = curthread; in pthread_atfork()
90 uberdata_t *udp = curthread->ul_uberdata; in _prefork_handler()
94 ASSERT(MUTEX_OWNED(&udp->atfork_lock, curthread)); in _prefork_handler()
111 uberdata_t *udp = curthread->ul_uberdata; in _postfork_parent_handler()
115 ASSERT(MUTEX_OWNED(&udp->atfork_lock, curthread)); in _postfork_parent_handler()
132 uberdata_t *udp = curthread->ul_uberdata; in _postfork_child_handler()
136 ASSERT(MUTEX_OWNED(&udp->atfork_lock, curthread)); in _postfork_child_handler()
/illumos-gate/usr/src/uts/intel/syscall/
H A Dgetcontext.c99 proc_t *p = ttoproc(curthread); in savecontext()
100 klwp_t *lwp = ttolwp(curthread); in savecontext()
186 aston(curthread); in savecontext()
235 kthread_t *t = curthread; in restorecontext()
259 aston(curthread); in restorecontext()
293 klwp_t *lwp = ttolwp(curthread); in getsetcontext()
311 schedctl_finish_sigblock(curthread); in getsetcontext()
312 ret = savecontext(&uc, &curthread->t_hold, SAVECTXT_F_NONE); in getsetcontext()
336 schedctl_finish_sigblock(curthread); in getsetcontext()
342 ret = savecontext(&uc, &curthread->t_hold, SAVECTXT_F_EXTD); in getsetcontext()
[all …]
/illumos-gate/usr/src/uts/intel/os/
H A Dsyscall.c151 ASSERT(t == curthread && curthread->t_schedflag & TS_DONT_SWAP); in syscall_entry()
238 kthread_t *t = curthread; in pre_syscall()
399 printf(" %s id=0x%p\n", PTOU(p)->u_comm, curthread); in pre_syscall()
427 kthread_t *t = curthread; in post_syscall()
457 aston(curthread); in post_syscall()
471 if (curthread->t_pdmsg != NULL) { in post_syscall()
472 char *m = curthread->t_pdmsg; in post_syscall()
476 curthread->t_pdmsg = NULL; in post_syscall()
495 if (curthread->t_rprof != NULL && in post_syscall()
496 curthread->t_rprof->rp_anystate != 0) { in post_syscall()
[all …]
H A Dfpu.c1149 if (curthread->t_lwp && fp == &curthread->t_lwp->lwp_pcb.pcb_fpu) { in fp_free()
1182 ASSERT(curthread->t_lwp && fp == &curthread->t_lwp->lwp_pcb.pcb_fpu); in fp_save()
1208 PCB_SET_UPDATE_FPU(&curthread->t_lwp->lwp_pcb); in fp_save()
1247 struct fpu_ctx *fp = &ttolwp(curthread)->lwp_pcb.pcb_fpu; in fp_exec()
1259 ctxop_attach(curthread, ctx); in fp_exec()
1275 struct fpu_ctx *fp = &ttolwp(curthread)->lwp_pcb.pcb_fpu; in fp_seed()
1277 ASSERT(curthread->t_preempt >= 1); in fp_seed()
1287 ctxop_attach(curthread, fp_ctxop_allocate(fp)); in fp_seed()
1387 fpu_ctx_t *fp = &ttolwp(curthread)->lwp_pcb.pcb_fpu; in fpexterrflt()
1455 fpu_ctx_t *fp = &ttolwp(curthread)->lwp_pcb.pcb_fpu; in fpsimderrflt()
[all …]
/illumos-gate/usr/src/cmd/dtrace/test/tst/common/scalars/
H A Dtst.selfarray2.d33 kthread_t *curthread; member
42 self->foo[0].curthread = curthread;
49 pid, self->foo[0].pid, self->foo[0].curthread, curthread);
/illumos-gate/usr/src/uts/sparc/dtrace/
H A Dfasttrap_isa.c432 if (curthread->t_dtrace_step) { in fasttrap_pid_probe()
433 ASSERT(curthread->t_dtrace_on); in fasttrap_pid_probe()
434 fasttrap_sigtrap(p, curthread, pc); in fasttrap_pid_probe()
441 curthread->t_dtrace_ft = 0; in fasttrap_pid_probe()
442 curthread->t_dtrace_pc = 0; in fasttrap_pid_probe()
443 curthread->t_dtrace_npc = 0; in fasttrap_pid_probe()
444 curthread->t_dtrace_scrpc = 0; in fasttrap_pid_probe()
445 curthread->t_dtrace_astpc = 0; in fasttrap_pid_probe()
929 curthread->t_dtrace_scrpc = rp->r_g7; in fasttrap_pid_probe()
930 curthread->t_dtrace_astpc = rp->r_g7 + FASTTRAP_OFF_FTRET; in fasttrap_pid_probe()
[all …]
/illumos-gate/usr/src/uts/common/cpr/
H A Dcpr_uthread.c60 p == proc_init || p == ttoproc(curthread)) in cpr_signal_user()
110 tp = curthread->t_next; in cpr_stop_user()
161 } while ((tp = tp->t_next) != curthread); in cpr_stop_user()
177 tp = curthread->t_next; in cpr_check_user_threads()
212 } while ((tp = tp->t_next) != curthread && rc == 0); in cpr_check_user_threads()
229 tp = curthread->t_next; in cpr_start_user_threads()
256 } while ((tp = tp->t_next) != curthread); in cpr_start_user_threads()
322 tp = curthread->t_next; in cpr_threads_are_stopped()
337 } while ((tp = tp->t_next) != curthread); in cpr_threads_are_stopped()
/illumos-gate/usr/src/uts/sparc/os/
H A Dsyscall.c206 kthread_t *t = curthread; in save_syscall_args()
323 klwp_t *lwp = ttolwp(curthread); in reset_syscall_args()
337 tsignal(curthread, SIGSYS); in nosys()
359 kthread_t *t = curthread; in pre_syscall()
504 printf(" %s id=0x%p\n", PTOU(p)->u_comm, curthread); in pre_syscall()
531 kthread_t *t = curthread; in post_syscall()
564 if (curthread->t_pdmsg != NULL) { in post_syscall()
565 char *m = curthread->t_pdmsg; in post_syscall()
569 curthread->t_pdmsg = NULL; in post_syscall()
587 if (curthread->t_rprof != NULL && in post_syscall()
[all …]

12345678910>>...20