/freebsd/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() 307 int nthreads = tq->tq_nthreads; taskq_destroy() local 347 taskq_create_synced(const char * name,int nthreads,pri_t pri,int minalloc,int maxalloc,uint_t flags,kthread_t *** ktpp) taskq_create_synced() argument [all...] |
/freebsd/sys/contrib/openzfs/module/os/freebsd/spl/ |
H A D | spl_taskq.c | 206 taskq_create_impl(const char *name, int nthreads, pri_t pri, in taskq_create_impl() argument 212 nthreads = MAX((mp_ncpus * nthreads) / 100, 1); in taskq_create_impl() 215 tq->tq_nthreads = nthreads; in taskq_create_impl() 222 (void) taskqueue_start_threads_in_proc(&tq->tq_queue, nthreads, pri, in taskq_create_impl() 229 taskq_create(const char *name, int nthreads, pri_t pri, int minalloc __unused, in taskq_create() argument 232 return (taskq_create_impl(name, nthreads, pri, system_proc, flags)); in taskq_create() 236 taskq_create_proc(const char *name, int nthreads, pri_t pri, in taskq_create_proc() argument 239 return (taskq_create_impl(name, nthreads, pri, proc, flags)); in taskq_create_proc() 280 taskq_create_synced(const char *name, int nthreads, pri_t pri, in taskq_create_synced() argument 284 taskq_sync_arg_t *tqs = kmem_zalloc(sizeof (*tqs) * nthreads, KM_SLEEP); in taskq_create_synced() [all …]
|
/freebsd/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/sys/cddl/compat/opensolaris/kern/ |
H A D | opensolaris_taskq.c | 65 taskq_create_impl(const char *name, int nthreads, pri_t pri, proc_t *proc, in taskq_create_impl() argument 71 nthreads = MAX((mp_ncpus * nthreads) / 100, 1); in taskq_create_impl() 76 (void) taskqueue_start_threads_in_proc(&tq->tq_queue, nthreads, pri, in taskq_create_impl() 83 taskq_create(const char *name, int nthreads, pri_t pri, int minalloc __unused, in taskq_create() argument 86 return (taskq_create_impl(name, nthreads, pri, system_proc, flags)); in taskq_create() 90 taskq_create_proc(const char *name, int nthreads, pri_t pri, int minalloc, in taskq_create_proc() argument 93 return (taskq_create_impl(name, nthreads, pri, proc, flags)); in taskq_create_proc()
|
/freebsd/contrib/libder/tests/ |
H A D | fuzz_parallel.c | 80 size_t nthreads; in LLVMFuzzerTestOneInput() local 99 for (nthreads = 0; nthreads < frame->frame_threads; nthreads++) { in LLVMFuzzerTestOneInput() 100 if (pthread_create(&threads[nthreads], NULL, thread_main, in LLVMFuzzerTestOneInput() 105 for (uint8_t i = 0; i < nthreads; i++) in LLVMFuzzerTestOneInput()
|
/freebsd/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/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/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cp_files/ |
H A D | seekflood.c | 116 int nthreads = 0; in main() local 119 (nthreads = atoi(argv[2])) == 0) { in main() 127 for (int i = 0; i < nthreads; i++) { in main() 166 for (int i = 0; i < nthreads; i++) { in main()
|
/freebsd/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() 1417 parts = sort_malloc(sizeof(struct sort_list*) * nthreads); 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() [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/sys/contrib/openzfs/module/os/linux/spl/ |
H A D | spl-taskq.c | 1324 int nthreads = threads_arg; in taskq_create() local 1332 ASSERT(nthreads <= 100); in taskq_create() 1333 ASSERT(nthreads >= 0); in taskq_create() 1334 nthreads = MIN(threads_arg, 100); in taskq_create() 1335 nthreads = MAX(nthreads, 0); in taskq_create() 1336 nthreads = MAX((num_online_cpus() * nthreads) /100, 1); in taskq_create() 1361 tq->tq_maxthreads = nthreads; in taskq_create() 1393 nthreads = 1; in taskq_create() 1395 for (i = 0; i < nthreads; i++) { in taskq_create() 1523 taskq_create_synced(const char *name, int nthreads, pri_t pri, in taskq_create_synced() argument [all …]
|
/freebsd/sys/contrib/openzfs/include/os/linux/spl/sys/ |
H A D | taskq.h | 204 #define taskq_create_proc(name, nthreads, pri, min, max, proc, flags) \ argument 205 taskq_create(name, nthreads, pri, min, max, flags) 206 #define taskq_create_sysdc(name, nthreads, min, max, proc, dc, flags) \ argument 208 taskq_create(name, nthreads, maxclsyspri, min, max, flags))
|
/freebsd/sys/powerpc/powernv/ |
H A D | platform_powernv.c | 454 int res, nthreads; in powernv_smp_probe_threads() 466 nthreads = 1; in powernv_smp_probe_threads() 475 nthreads = res / sizeof(cell_t); in powernv_smp_probe_threads() 477 nthreads = 1; in powernv_smp_probe_threads() 481 smp_threads_per_core = nthreads; in cpu_group_init() 482 if (mp_ncpus % nthreads == 0) in cpu_group_init() 483 mp_ncores = mp_ncpus / nthreads; in cpu_group_init() 448 int res, nthreads; powernv_smp_probe_threads() local
|
/freebsd/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/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/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/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() 1683 uint64_t n = targ->g->npackets / targ->g->nthreads; in sender_body() 1931 uint64_t n = targ->g->npackets / targ->g->nthreads; in receiver_body() 2061 if (targ->g->nthreads > 1) { in txseq_body() 2621 targs = calloc(g->nthreads, sizeof(*targs)); in start_threads() 2627 for (i = 0; i < g->nthreads; i++) { in start_threads() 2698 for (i = 0; i < g->nthreads; i++) { in start_threads() 2734 for (i = 0; i < g->nthreads; i++) { in main_thread() [all …]
|
/freebsd/contrib/llvm-project/openmp/runtime/src/ |
H A D | kmp_tasking.cpp | 2093 kmp_int32 nthreads = this_thr->th.th_team_nproc; local 2094 for (int i = 0; i < nthreads; ++i) { 3382 kmp_int32 nthreads, victim_tid = -2, use_own_tasks = 1, new_victim = 0, local 3400 nthreads = task_team->tt.tt_nproc; 3414 if ((task == NULL) && (nthreads > 1)) { // Steal a task finally 3432 victim_tid = __kmp_get_random(thread) % (nthreads - 1); 3583 if (nthreads == 1 && 3664 int nthreads, i, is_init_thread; local 3672 nthreads = task_team->tt.tt_nproc; 3673 KMP_DEBUG_ASSERT(nthreads > 0); [all …]
|
/freebsd/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/sys/kern/ |
H A D | kern_thread.c | 161 static __exclusive_cache_line int nthreads; variable 180 nthreads_new = atomic_fetchadd_int(&nthreads, 1) + 1; in thread_count_inc_try() 184 atomic_subtract_int(&nthreads, 1); in thread_count_inc_try() 219 atomic_subtract_int(&nthreads, n); in thread_count_sub()
|
/freebsd/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;
|