Lines Matching defs:thread
34 * to be performed later, by another thread. There are several reasons
59 * the same list managed by the same thread.
65 * which has an individual thread for each of the tasks. These threads are
140 * system process. If proc != &p0, this must be called from a thread
224 * int taskq_member(tq, thread)
226 * Returns 1 if 'thread' belongs to taskq 'tq' and 0 otherwise. The
279 * | | ... | | thread | | thread | |
286 * | | ... | | thread | | thread |
297 * All threads used by task queues mark t_taskq field of the thread to
318 * - Indicates that a thread is being created in the taskq.
323 * create the first thread. taskq_thread_create() increments tq_active,
324 * sets TASKQ_THREAD_CREATED, and creates the new thread.
326 * Each thread starts in taskq_thread(), clears the TASKQ_THREAD_CREATED
328 * tq_nthreads as its "thread_id", and stores its thread pointer in the
333 * for the taskq queue, so every thread can exit without any ordering being
336 * Threads will only process work if their thread id is <= tq_nthreads_target.
338 * When TASKQ_CHANGING is set, threads will check the current thread target
344 * percentage in tq_threads_ncpus_pct, start them off with the correct thread
353 * For a dynamic task queues there is a 1-to-1 mapping between a thread and
354 * taskq_ent_structure. Each entry is serviced by its own thread and each thread
365 * thread to execute the task. Once the thread executes the task it clears the
372 * free list, sets its "func" and "arg" fields and signals a worker thread.
374 * After executing each task a per-entry thread taskq_d_thread() places its
377 * itself. The thread sleep time is controlled by a tunable variable
382 * death statistics is kept in the global taskq data structure. Since thread
387 * between the bucket and actual thread CPU, so buckets are used only to
392 * Current algorithm creates a thread whenever a bucket has no free
405 * queues) obtains taskq's thread lock as a reader. The taskq_suspend()
420 * taskq_member() function works by comparing a thread t_taskq pointer with
421 * the passed thread pointer.
457 * - Minimum size of the thread list for a taskq.
458 * Useful for testing different thread pool
485 #include <sys/thread.h>
527 * one thread ready to handle requests. To guarantee this, we have to wait
528 * for the second thread, since the first one cannot process requests until
529 * the second thread has been created.
761 * Do-nothing task which may be used to prepopulate thread caches.
1409 taskq_member(taskq_t *tq, kthread_t *thread)
1411 return (thread->t_taskq == tq);
1415 * Creates a thread in the taskq. We only allow one outstanding create at
1439 * With TASKQ_DUTY_CYCLE the new thread must have an LWP
1459 * We know the thread cannot go away, since tq cannot be
1476 * Common "sleep taskq thread" function, which handles CPR stuff, as well
1501 * Worker thread for processing task queue.
1550 * thread_id and thread, we must exit from
1551 * highest thread ID to least.
1570 * If no thread is starting taskq_thread(), we can
1579 /* Check if we need to create a thread */
1666 * Worker per-entry thread for dynamic dispatches.
1738 * If a thread is sleeping too long, it dies.
1752 * both cases destroy the thread and the entry.
1771 * This thread is sleeping for too long or we are
1896 /* For dynamic task queues use just one backup thread */
1966 * Create the first thread, which will create any other threads
2158 * Extend a bucket with a new entry on the free list and attach a worker thread
2206 * Create a thread in a TS_STOPPED state first. If it is successfully
2207 * created, place the entry on the free list and start the thread.
2230 * Start the stopped thread.