Lines Matching defs:thread
78 #include <kern/thread.h>
124 extern kern_return_t thread_setstatus(thread_t thread, int flavor,
126 extern void thread_set_cthreadself(thread_t thread, uint64_t pself, int isLP64);
601 * Signal a condition variable, waking only one thread.
1132 * it will not be set if all affinity groups have at least 1 thread
1134 * thread, there is no need to add more threads even if we're not
1218 thread_t thread)
1224 uth = get_bsdthread_info(thread);
1238 * we were the last active thread on this affinity set
1243 * if this thread is blocking (not parking)
1257 KERNEL_DEBUG(0xefffd020, (int)thread, wq->wq_threads_scheduled, tl->th_affinity_tag, 0, 0);
1267 * the thread lock for the thread being UNBLOCKED
1275 KERNEL_DEBUG(0xefffd024, (int)thread, wq->wq_threads_scheduled, tl->th_affinity_tag, 0, 0);
1301 * look for an idle thread to steal from this affinity group
1302 * but don't grab the only thread associated with it
1323 * thread was created, but never used...
1335 * drop our ref on the thread
1453 * we're adding a new thread, go evaluate the
1636 * drop our last ref on the thread
1647 * drop our last ref on the thread
1719 workqueue_run_nextitem(proc_t p, thread_t thread)
1739 KERNEL_DEBUG(0xefffd000 | DBG_FUNC_START, (int)thread, wq->wq_threads_scheduled, wq->wq_stalled_count, 0, 0);
1742 if ((th_to_park = thread) == THREAD_NULL)
1746 if (thread != THREAD_NULL) {
1748 * we're a worker thread from the pool... currently we
1752 uth = get_bsdthread_info(thread);
1757 * we're the only active thread associated with our
1760 th_to_run = thread;
1767 * and has at least 1 idle thread
1775 if (thread == THREAD_NULL) {
1781 * we've already got at least 1 thread per
1798 * so park this thread
1800 th_to_park = thread;
1820 * active threads) to start a new thread on...
1822 * and an idle thread with the correct affinity tag, so
1823 * fall into the code that pulls a new thread and workitem...
1824 * once we've kicked that thread off, we'll park this one
1867 if (thread != th_to_run) {
1869 * we're starting up a thread from a parked/suspended condition
1883 * we ask the timer thread (which should already be running)
1906 * if current thread is reused for workitem, does not return via unix_syscall
1908 wq_runitem(p, item, th_to_run, tl, reuse_thread, wake_thread, (thread == th_to_run));
1912 KERNEL_DEBUG(0xefffd000 | DBG_FUNC_END, (int)thread, (int)item, wq->wq_flags, 1, 0);
1921 * this is a workqueue thread with no more
1927 panic("wq thread with no threadlist ");
1954 KERNEL_DEBUG(0xefffd000 | DBG_FUNC_END, (int)thread, 0, wq->wq_flags, 2, 0);