Lines Matching refs:nthreads
268 taskq_create_proc(const char *name, int nthreads, pri_t pri, in taskq_create_proc() argument
276 ASSERT3S(nthreads, >=, 0); in taskq_create_proc()
277 ASSERT3S(nthreads, <=, 100); in taskq_create_proc()
278 pct = MIN(nthreads, 100); in taskq_create_proc()
281 nthreads = (sysconf(_SC_NPROCESSORS_ONLN) * pct) / 100; in taskq_create_proc()
282 nthreads = MAX(nthreads, 1); /* need at least 1 thread */ in taskq_create_proc()
284 ASSERT3S(nthreads, >=, 1); in taskq_create_proc()
293 tq->tq_active = nthreads; in taskq_create_proc()
294 tq->tq_nthreads = nthreads; in taskq_create_proc()
299 tq->tq_threadlist = kmem_alloc(nthreads * sizeof (thread_t), KM_SLEEP); in taskq_create_proc()
308 for (t = 0; t < nthreads; t++) in taskq_create_proc()
319 int nthreads = tq->tq_nthreads; in taskq_destroy() local
339 for (t = 0; t < nthreads; t++) in taskq_destroy()
342 kmem_free(tq->tq_threadlist, nthreads * sizeof (thread_t)); in taskq_destroy()