Lines Matching refs:td
243 cpu_set_thread_handler(thread_t td, void (*rfunc)(void), void *func, void *arg) in cpu_set_thread_handler() argument
245 td->td_pcb->pcb_rbx = (long)func; in cpu_set_thread_handler()
246 td->td_pcb->pcb_r12 = (long)arg; in cpu_set_thread_handler()
247 td->td_switch = cpu_lwkt_switch; in cpu_set_thread_handler()
248 td->td_sp -= sizeof(void *); in cpu_set_thread_handler()
249 *(void **)td->td_sp = rfunc; /* exit function on return */ in cpu_set_thread_handler()
250 td->td_sp -= sizeof(void *); in cpu_set_thread_handler()
251 *(void **)td->td_sp = cpu_kthread_restore; in cpu_set_thread_handler()
257 struct thread *td = curthread; in cpu_lwp_exit() local
260 pcb = td->td_pcb; in cpu_lwp_exit()
272 td->td_gd->gd_cnt.v_swtch++; in cpu_lwp_exit()
274 crit_enter_quick(td); in cpu_lwp_exit()
275 if (td->td_flags & TDF_TSLEEPQ) in cpu_lwp_exit()
276 tsleep_remove(td); in cpu_lwp_exit()
277 lwkt_deschedule_self(td); in cpu_lwp_exit()
278 lwkt_remove_tdallq(td); in cpu_lwp_exit()