Lines Matching defs:thread
32 #include <kern/thread.h>
101 * retrieving the first thread for extra safety.
105 thread_t thread = (thread_t)queue_first(&task->threads);
107 if (queue_end(&task->threads, (queue_entry_t)thread))
108 thread = THREAD_NULL;
113 return (thread);
123 thread_t inc, thread = THREAD_NULL;
138 thread = inc;
147 *result_out = thread;
149 if (thread) {
151 act_set_astbsd(thread);
153 thread_mtx_unlock(thread);
167 thread_t thread,
183 if (inc == thread) {
201 act_set_astbsd(thread);
203 thread_mtx_unlock(thread);
212 * This is only safe to call from a thread executing in
285 thread_t thread = current_thread();
288 if (task != thread->task)
293 thread->map = task->map = map;
296 inval_copy_windows(thread);
446 * see if the current thread is aborted. But unlike above, it also
447 * checks to see if thread is safely aborted. If so, it returns
520 thread_t thread;
539 queue_iterate(&task->threads, thread, thread_t, task_threads) {
542 if ((thread->state & TH_RUN) == TH_RUN)
544 cswitch += thread->c_switch;
545 tval = timer_grab(&thread->user_timer);
549 tval = timer_grab(&thread->system_timer);
675 thread_t thread;
677 thread = current_thread();
679 if (thread->funnel_lock)