Lines Matching defs:threads
160 static int sv_threads_dev = 2; /* # of threads to alloc per device */
162 static int sv_threads_needed; /* number of threads needed */
164 static int sv_max_nlive; /* max number of threads running */
1613 sv_thread_tune(int threads)
1615 int incr = (threads > 0) ? 1 : -1;
1622 /* keep track of any additional threads requested */
1623 if (threads > 0) {
1624 sv_threads_extra += threads;
1627 threads = -threads;
1628 if (threads >= sv_threads_extra) {
1629 threads -= sv_threads_extra;
1633 sv_threads_extra -= threads;
1636 } else if (threads > 0) {
1638 * do not increase the number of threads beyond
1642 if ((nthreads + threads) > sv_threads_max) {
1643 sv_threads_extra = nthreads + threads - sv_threads_max;
1644 threads = sv_threads_max - nthreads;
1645 if (threads <= 0)
1650 if (threads < 0)
1651 threads = -threads;
1653 while (threads--) {
1668 "!sv_thread_tune: threads needed %d, nthreads %d, "
1706 /* threads still active - wait for them to exit */
1720 "sv:svclose: threads still active "
1810 "!sv: could not allocate %d threads",
2390 * out of threads, so fall back to synchronous io.