- nthreads = pset->runq.count;
- processor = (processor_t)queue_first(&pset->processors);
- while (!queue_end(&pset->processors, (queue_entry_t)processor)) {
- nthreads += processor->runq.count;
-
- processor = (processor_t)queue_next(&processor->processors);
- }
-
- /*
- * account for threads on cpus.
- */
- nthreads += ncpus - pset->idle_count;