Lines Matching refs:t
69 cv_unsleep(kthread_t *t) in cv_unsleep() argument
71 condvar_impl_t *cvp = (condvar_impl_t *)t->t_wchan; in cv_unsleep()
74 ASSERT(THREAD_LOCK_HELD(t)); in cv_unsleep()
78 (void *)t, (void *)sqh); in cv_unsleep()
79 DTRACE_SCHED1(wakeup, kthread_t *, t); in cv_unsleep()
80 sleepq_unsleep(t); in cv_unsleep()
84 CL_SETRUN(t); in cv_unsleep()
91 cv_change_pri(kthread_t *t, pri_t pri, pri_t *t_prip) in cv_change_pri() argument
93 condvar_impl_t *cvp = (condvar_impl_t *)t->t_wchan; in cv_change_pri()
94 sleepq_t *sqp = t->t_sleepq; in cv_change_pri()
96 ASSERT(THREAD_LOCK_HELD(t)); in cv_change_pri()
100 panic("cv_change_pri: %p not on sleep queue", (void *)t); in cv_change_pri()
101 sleepq_dequeue(t); in cv_change_pri()
103 sleepq_insert(sqp, t); in cv_change_pri()
143 kthread_t *t = curthread; in cv_block() local
144 klwp_t *lwp = ttolwp(t); in cv_block()
147 ASSERT(THREAD_LOCK_HELD(t)); in cv_block()
148 ASSERT(t != CPU->cpu_idle_thread); in cv_block()
150 ASSERT(t->t_wchan0 == NULL && t->t_wchan == NULL); in cv_block()
151 ASSERT(t->t_state == TS_ONPROC); in cv_block()
153 t->t_schedflag &= ~TS_SIGNALLED; in cv_block()
154 CL_SLEEP(t); /* assign kernel priority */ in cv_block()
155 t->t_wchan = (caddr_t)cvp; in cv_block()
156 t->t_sobj_ops = &cv_sobj_ops; in cv_block()
164 if (lwp != NULL && t->t_intr == NULL) { in cv_block()
166 (void) new_mstate(t, LMS_SLEEP); in cv_block()
174 THREAD_SLEEP(t, &sqh->sq_lock); in cv_block()
175 sleepq_insert(&sqh->sq_queue, t); in cv_block()
183 #define cv_block_sig(t, cvp) \ argument
184 { (t)->t_flag |= T_WAKEABLE; cv_block(cvp); }
209 kthread_t *t = arg; in cv_wakeup() local
215 mutex_enter(&t->t_wait_mutex); in cv_wakeup()
216 mutex_exit(&t->t_wait_mutex); in cv_wakeup()
217 setrun(t); in cv_wakeup()
265 kthread_t *t = curthread; in cv_timedwait_hires() local
278 mutex_enter(&t->t_wait_mutex); in cv_timedwait_hires()
279 id = timeout_generic(CALLOUT_REALTIME, (void (*)(void *))cv_wakeup, t, in cv_timedwait_hires()
281 thread_lock(t); /* lock the thread */ in cv_timedwait_hires()
283 thread_unlock_nopreempt(t); in cv_timedwait_hires()
284 mutex_exit(&t->t_wait_mutex); in cv_timedwait_hires()
287 signalled = (t->t_schedflag & TS_SIGNALLED); in cv_timedwait_hires()
308 kthread_t *t = curthread; in cv_wait_sig() local
309 proc_t *p = ttoproc(t); in cv_wait_sig()
310 klwp_t *lwp = ttolwp(t); in cv_wait_sig()
328 ASSERT(t->t_intr == NULL); in cv_wait_sig()
334 thread_lock(t); in cv_wait_sig()
335 cv_block_sig(t, (condvar_impl_t *)cvp); in cv_wait_sig()
336 thread_unlock_nopreempt(t); in cv_wait_sig()
338 if (ISSIG(t, JUSTLOOKING) || MUSTRETURN(p, t) || cancel_pending) in cv_wait_sig()
339 setrun(t); in cv_wait_sig()
342 signalled = (t->t_schedflag & TS_SIGNALLED); in cv_wait_sig()
343 t->t_flag &= ~T_WAKEABLE; 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()
368 kthread_t *t = curthread; in cv_timedwait_sig_hires() local
369 proc_t *p = ttoproc(t); in cv_timedwait_sig_hires()
370 klwp_t *lwp = ttolwp(t); in cv_timedwait_sig_hires()
388 ASSERT(t->t_intr == NULL); in cv_timedwait_sig_hires()
409 mutex_enter(&t->t_wait_mutex); in cv_timedwait_sig_hires()
410 id = timeout_generic(CALLOUT_REALTIME, (void (*)(void *))cv_wakeup, t, in cv_timedwait_sig_hires()
414 thread_lock(t); in cv_timedwait_sig_hires()
415 cv_block_sig(t, (condvar_impl_t *)cvp); in cv_timedwait_sig_hires()
416 thread_unlock_nopreempt(t); in cv_timedwait_sig_hires()
417 mutex_exit(&t->t_wait_mutex); in cv_timedwait_sig_hires()
419 if (ISSIG(t, JUSTLOOKING) || MUSTRETURN(p, t) || cancel_pending) in cv_timedwait_sig_hires()
420 setrun(t); in cv_timedwait_sig_hires()
423 signalled = (t->t_schedflag & TS_SIGNALLED); in cv_timedwait_sig_hires()
424 t->t_flag &= ~T_WAKEABLE; in cv_timedwait_sig_hires()
444 if (ISSIG_PENDING(t, lwp, p)) { in cv_timedwait_sig_hires()
450 if (lwp->lwp_sysabort || MUSTRETURN(p, t)) in cv_timedwait_sig_hires()
531 kthread_t *t = curthread; in cv_wait_sig_swap_core() local
532 proc_t *p = ttoproc(t); in cv_wait_sig_swap_core()
533 klwp_t *lwp = ttolwp(t); in cv_wait_sig_swap_core()
550 ASSERT(t->t_intr == NULL); in cv_wait_sig_swap_core()
555 thread_lock(t); in cv_wait_sig_swap_core()
556 cv_block_sig(t, (condvar_impl_t *)cvp); in cv_wait_sig_swap_core()
559 thread_unlock_nopreempt(t); in cv_wait_sig_swap_core()
561 if (ISSIG(t, JUSTLOOKING) || MUSTRETURN(p, t) || cancel_pending) in cv_wait_sig_swap_core()
562 setrun(t); in cv_wait_sig_swap_core()
565 signalled = (t->t_schedflag & TS_SIGNALLED); in cv_wait_sig_swap_core()
566 t->t_flag &= ~T_WAKEABLE; in cv_wait_sig_swap_core()
570 if (ISSIG_PENDING(t, lwp, p)) { in cv_wait_sig_swap_core()
576 if (lwp->lwp_sysabort || MUSTRETURN(p, t)) in cv_wait_sig_swap_core()
615 kthread_t *t; in cv_signal() local
617 t = sleepq_wakeone_chan(&sqh->sq_queue, cp); in cv_signal()
623 ASSERT(t != NULL); in cv_signal()
657 kthread_t *t = curthread; in cv_wait_stop() local
658 klwp_t *lwp = ttolwp(t); in cv_wait_stop()
659 proc_t *p = ttoproc(t); in cv_wait_stop()
675 ASSERT(t->t_intr == NULL); in cv_wait_stop()
681 mutex_enter(&t->t_wait_mutex); in cv_wait_stop()
682 id = realtime_timeout_default((void (*)(void *))cv_wakeup, t, in cv_wait_stop()
684 thread_lock(t); /* lock the thread */ in cv_wait_stop()
686 thread_unlock_nopreempt(t); in cv_wait_stop()
687 mutex_exit(&t->t_wait_mutex); in cv_wait_stop()
702 if (t->t_proc_flag & TP_PAUSE) { in cv_wait_stop()
709 if (t->t_proc_flag & TP_CHKPT) { in cv_wait_stop()
718 (t->t_proc_flag & TP_HOLDLWP)) { in cv_wait_stop()
725 if (t->t_proc_flag & TP_PRSTOP) { in cv_wait_stop()
732 if (p->p_stopsig && t != p->p_agenttp) { in cv_wait_stop()