| /freebsd-14.2/tools/tools/netrate/netreceive/ |
| H A D | netreceive.c | 125 make_threads(int *s, int nsock, int nthreads) in make_threads() argument 127 int i, si, nt = nsock * nthreads; in make_threads() 157 main_thread(struct td_desc **tp, int nsock, int nthreads) in main_thread() argument 166 int i, nt = nsock * nthreads; in main_thread() 199 int error, v, nthreads = 1; in main() local 217 nthreads = strtoul(argv[2], &dummy, 10); in main() 218 if (nthreads < 1 || nthreads > 64) in main() 265 nsock, nthreads, (u_short)port); in main() 267 tp = make_threads(s, nsock, nthreads); in main() 268 main_thread(tp, nsock, nthreads); in main()
|
| /freebsd-14.2/sys/contrib/openzfs/lib/libzpool/ |
| H A D | taskq.c | 254 taskq_create(const char *name, int nthreads, pri_t pri, in taskq_create() argument 263 ASSERT3S(nthreads, >=, 0); in taskq_create() 264 ASSERT3S(nthreads, <=, 100); in taskq_create() 265 pct = MIN(nthreads, 100); in taskq_create() 268 nthreads = (sysconf(_SC_NPROCESSORS_ONLN) * pct) / 100; in taskq_create() 269 nthreads = MAX(nthreads, 1); /* need at least 1 thread */ in taskq_create() 271 ASSERT3S(nthreads, >=, 1); in taskq_create() 281 tq->tq_active = nthreads; in taskq_create() 282 tq->tq_nthreads = nthreads; in taskq_create() 297 for (t = 0; t < nthreads; t++) in taskq_create() [all …]
|
| /freebsd-14.2/sys/cddl/compat/opensolaris/kern/ |
| H A D | opensolaris_taskq.c | 66 taskq_create_impl(const char *name, int nthreads, pri_t pri, proc_t *proc, in taskq_create_impl() argument 72 nthreads = MAX((mp_ncpus * nthreads) / 100, 1); in taskq_create_impl() 77 (void) taskqueue_start_threads_in_proc(&tq->tq_queue, nthreads, pri, in taskq_create_impl() 84 taskq_create(const char *name, int nthreads, pri_t pri, int minalloc __unused, in taskq_create() argument 87 return (taskq_create_impl(name, nthreads, pri, system_proc, flags)); in taskq_create() 91 taskq_create_proc(const char *name, int nthreads, pri_t pri, int minalloc, in taskq_create_proc() argument 94 return (taskq_create_impl(name, nthreads, pri, proc, flags)); in taskq_create_proc()
|
| /freebsd-14.2/tools/test/stress2/misc/ |
| H A D | rdgsbase.sh | 127 start(int nthreads) 129 pthread_t thrs[nthreads * 2]; 132 for (i = 0; i < nthreads; i++) { 137 for (; i < 2 * nthreads; i++) { 148 int error, nthreads; 163 len = sizeof(nthreads); 164 error = sysctl(mib, nitems(mib), &nthreads, &len, NULL, 0); 169 start(nthreads);
|
| /freebsd-14.2/contrib/netbsd-tests/lib/libpthread/ |
| H A D | h_resolv.c | 144 int nthreads = NTHREADS; in main() local 160 nthreads = atoi(optarg); in main() 172 if ((nleft = malloc(nthreads * sizeof(int))) == NULL) in main() 180 for (i = 0; i < nthreads; i++) { in main() 187 for (i = 0; i < nthreads; i++) { in main()
|
| /freebsd-14.2/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/ |
| H A D | seekflood.c | 109 int nthreads = 0; in main() local 112 (nthreads = atoi(argv[2])) == 0) { in main() 120 for (int i = 0; i < nthreads; i++) { in main() 159 for (int i = 0; i < nthreads; i++) { in main()
|
| /freebsd-14.2/sys/contrib/openzfs/include/os/linux/spl/sys/ |
| H A D | taskq.h | 161 #define taskq_create_proc(name, nthreads, pri, min, max, proc, flags) \ argument 162 taskq_create(name, nthreads, pri, min, max, flags) 163 #define taskq_create_sysdc(name, nthreads, min, max, proc, dc, flags) \ argument 165 taskq_create(name, nthreads, maxclsyspri, min, max, flags))
|
| /freebsd-14.2/sys/contrib/openzfs/module/os/freebsd/spl/ |
| H A D | spl_taskq.c | 214 taskq_create_impl(const char *name, int nthreads, pri_t pri, in taskq_create_impl() argument 220 nthreads = MAX((mp_ncpus * nthreads) / 100, 1); in taskq_create_impl() 229 (void) taskqueue_start_threads_in_proc(&tq->tq_queue, nthreads, pri, in taskq_create_impl() 236 taskq_create(const char *name, int nthreads, pri_t pri, int minalloc __unused, in taskq_create() argument 239 return (taskq_create_impl(name, nthreads, pri, system_proc, flags)); in taskq_create() 243 taskq_create_proc(const char *name, int nthreads, pri_t pri, in taskq_create_proc() argument 246 return (taskq_create_impl(name, nthreads, pri, proc, flags)); in taskq_create_proc()
|
| /freebsd-14.2/usr.bin/sort/ |
| H A D | radixsort.c | 104 if (sort_left == 0 && nthreads > 1) in sort_left_dec() 150 if (nthreads > 1) { in push_ls() 633 if (nthreads < 2) { in run_top_sort_level() 640 for(i = 0; i < nthreads; ++i) { in run_top_sort_level() 662 for (i = 0; i < nthreads; ++i) in run_top_sort_level() 674 size_t nthreads_save = nthreads; in run_sort() 676 nthreads = 1; in run_sort() 678 if (nthreads > 1) { in run_sort() 709 if (nthreads > 1) { in run_sort() 713 nthreads = nthreads_save; in run_sort()
|
| H A D | file.c | 1400 if (nthreads < 2 || list->count < MT_SORT_THRESHOLD) { in mt_sort() 1401 size_t nthreads_save = nthreads; in mt_sort() 1402 nthreads = 1; in mt_sort() 1410 nthreads = nthreads_save; in mt_sort() 1419 avgsize = list->count / nthreads; in mt_sort() 1425 for (i = 0; i < nthreads; ++i) { in mt_sort() 1433 sz = (i == nthreads - 1) ? list->count - cstart : in mt_sort() 1447 for (i = 0; i < nthreads; ++i) { in mt_sort() 1471 for (i = 0; i < nthreads; ++i) { in mt_sort() 1478 merge_list_parts(parts, nthreads, fn); in mt_sort() [all …]
|
| H A D | sort.c | 98 size_t nthreads = 1; variable 282 nthreads = ncpu; in set_hw_params() 1121 nthreads = (size_t)(atoi(optarg)); in main() 1122 if (nthreads < 1) in main() 1123 nthreads = 1; in main() 1124 if (nthreads > 1024) in main() 1125 nthreads = 1024; in main() 1222 nthreads = 1; in main() 1265 nthreads = 1; in main()
|
| H A D | sort.h | 52 extern size_t nthreads;
|
| /freebsd-14.2/sys/contrib/openzfs/module/os/linux/spl/ |
| H A D | spl-taskq.c | 1051 int nthreads = threads_arg; in taskq_create() local 1059 ASSERT(nthreads <= 100); in taskq_create() 1060 ASSERT(nthreads >= 0); in taskq_create() 1062 nthreads = MAX(nthreads, 0); in taskq_create() 1063 nthreads = MAX((num_online_cpus() * nthreads) /100, 1); in taskq_create() 1089 tq->tq_maxthreads = nthreads; in taskq_create() 1120 nthreads = 1; in taskq_create() 1318 nthreads = MAX(((num_online_cpus() + 1) * nthreads) / 100, 1); in spl_taskq_expand() 1319 tq->tq_maxthreads = nthreads; in spl_taskq_expand() 1352 nthreads = MAX(((num_online_cpus()) * nthreads) / 100, 1); in spl_taskq_prepare_down() [all …]
|
| /freebsd-14.2/sys/powerpc/powernv/ |
| H A D | platform_powernv.c | 449 int res, nthreads; in powernv_smp_probe_threads() local 461 nthreads = 1; in powernv_smp_probe_threads() 470 nthreads = res / sizeof(cell_t); in powernv_smp_probe_threads() 472 nthreads = 1; in powernv_smp_probe_threads() 476 smp_threads_per_core = nthreads; in powernv_smp_probe_threads() 477 if (mp_ncpus % nthreads == 0) in powernv_smp_probe_threads() 478 mp_ncores = mp_ncpus / nthreads; in powernv_smp_probe_threads()
|
| /freebsd-14.2/cddl/contrib/opensolaris/tools/ctf/cvt/ |
| H A D | barrier.c | 49 barrier_init(barrier_t *bar, int nthreads) in barrier_init() argument 59 bar->bar_nthr = nthreads; in barrier_init()
|
| /freebsd-14.2/lib/libc/tests/resolv/ |
| H A D | resolv_test.c | 254 size_t nthreads = NTHREADS; in run_tests() local 274 threads = calloc(nthreads, sizeof(pthread_t)); in run_tests() 277 for (i = 0; i < nthreads; i++) { in run_tests() 281 for (i = 0; i < nthreads; i++) { in run_tests()
|
| /freebsd-14.2/contrib/llvm-project/openmp/runtime/src/ |
| H A D | kmp_tasking.cpp | 3388 nthreads = task_team->tt.tt_nproc; 3573 if (nthreads == 1 && 3654 int nthreads, i, is_init_thread; local 3662 nthreads = task_team->tt.tt_nproc; 3663 KMP_DEBUG_ASSERT(nthreads > 0); 3685 for (i = 0; i < nthreads; i++) { 3811 kmp_int32 nthreads, maxthreads; local 3820 nthreads = task_team->tt.tt_nproc; 3834 if (maxthreads < nthreads) { 3950 int nthreads; local [all …]
|
| /freebsd-14.2/contrib/jemalloc/include/jemalloc/internal/ |
| H A D | arena_externs.h | 23 unsigned *nthreads, const char **dss, ssize_t *dirty_decay_ms, 25 void arena_stats_merge(tsdn_t *tsdn, arena_t *arena, unsigned *nthreads,
|
| H A D | arena_structs_b.h | 91 atomic_u_t nthreads[2]; member
|
| H A D | ctl.h | 70 unsigned nthreads; member
|
| /freebsd-14.2/tools/tools/netmap/ |
| H A D | pkt-gen.c | 269 int nthreads; member 1403 if (targ->g->nthreads > 1) { in ping_body() 1591 if (targ->g->nthreads > 1) { in pong_body() 2061 if (targ->g->nthreads > 1) { in txseq_body() 2788 if (done == g->nthreads) in main_thread() 2958 g.nthreads = 1; in main() 3102 g.nthreads = atoi(optarg); in main() 3244 if (g.nthreads > 1) { in main() 3281 if (g.nthreads < 1 || g.nthreads > devqueues) { in main() 3323 g.nthreads, in main() [all …]
|
| /freebsd-14.2/contrib/jemalloc/src/ |
| H A D | arena.c | 70 arena_basic_stats_merge(tsdn_t *tsdn, arena_t *arena, unsigned *nthreads, in arena_basic_stats_merge() argument 73 *nthreads += arena_nthreads_get(arena, false); in arena_basic_stats_merge() 83 arena_stats_merge(tsdn_t *tsdn, arena_t *arena, unsigned *nthreads, in arena_stats_merge() argument 90 arena_basic_stats_merge(tsdn, arena, nthreads, dss, dirty_decay_ms, in arena_stats_merge() 1923 return atomic_load_u(&arena->nthreads[internal], ATOMIC_RELAXED); in arena_nthreads_get() 1928 atomic_fetch_add_u(&arena->nthreads[internal], 1, ATOMIC_RELAXED); in arena_nthreads_inc() 1933 atomic_fetch_sub_u(&arena->nthreads[internal], 1, ATOMIC_RELAXED); in arena_nthreads_dec() 1966 atomic_store_u(&arena->nthreads[0], 0, ATOMIC_RELAXED); in arena_new() 1967 atomic_store_u(&arena->nthreads[1], 0, ATOMIC_RELAXED); in arena_new() 2258 atomic_store_u(&arena->nthreads[0], 0, ATOMIC_RELAXED); in arena_postfork_child() [all …]
|
| /freebsd-14.2/sys/kern/ |
| H A D | kern_thread.c | 160 static __exclusive_cache_line int nthreads; variable 179 nthreads_new = atomic_fetchadd_int(&nthreads, 1) + 1; in thread_count_inc_try() 183 atomic_subtract_int(&nthreads, 1); in thread_count_inc_try() 218 atomic_subtract_int(&nthreads, n); in thread_count_sub()
|
| /freebsd-14.2/contrib/googletest/googletest/src/ |
| H A D | gtest-port.cc | 208 size_t nthreads = 0; 210 if (info[i].p_tid != -1) nthreads++; 212 return nthreads;
|
| /freebsd-14.2/contrib/processor-trace/libipt/test/src/ |
| H A D | ptunit-block_cache.c | 91 for (thrd = 0; thrd < bfix->thrd.nthreads; ++thrd) in bfix_fini()
|