| /freebsd-13.1/tools/tools/netrate/netreceive/ |
| H A D | netreceive.c | 127 make_threads(int *s, int nsock, int nthreads) in make_threads() argument 129 int i, si, nt = nsock * nthreads; in make_threads() 159 main_thread(struct td_desc **tp, int nsock, int nthreads) in main_thread() argument 168 int i, nt = nsock * nthreads; in main_thread() 201 int error, v, nthreads = 1; in main() local 219 nthreads = strtoul(argv[2], &dummy, 10); in main() 220 if (nthreads < 1 || nthreads > 64) in main() 267 nsock, nthreads, (u_short)port); in main() 269 tp = make_threads(s, nsock, nthreads); in main() 270 main_thread(tp, nsock, nthreads); in main()
|
| /freebsd-13.1/sys/contrib/openzfs/lib/libzpool/ |
| H A D | taskq.c | 252 taskq_create(const char *name, int nthreads, pri_t pri, in taskq_create() argument 260 ASSERT3S(nthreads, >=, 0); in taskq_create() 261 ASSERT3S(nthreads, <=, 100); in taskq_create() 262 pct = MIN(nthreads, 100); in taskq_create() 265 nthreads = (sysconf(_SC_NPROCESSORS_ONLN) * pct) / 100; in taskq_create() 266 nthreads = MAX(nthreads, 1); /* need at least 1 thread */ in taskq_create() 268 ASSERT3S(nthreads, >=, 1); in taskq_create() 278 tq->tq_active = nthreads; in taskq_create() 279 tq->tq_nthreads = nthreads; in taskq_create() 294 for (t = 0; t < nthreads; t++) in taskq_create() [all …]
|
| /freebsd-13.1/sys/cddl/compat/opensolaris/kern/ |
| H A D | opensolaris_taskq.c | 68 taskq_create_impl(const char *name, int nthreads, pri_t pri, proc_t *proc, in taskq_create_impl() argument 74 nthreads = MAX((mp_ncpus * nthreads) / 100, 1); in taskq_create_impl() 79 (void) taskqueue_start_threads_in_proc(&tq->tq_queue, nthreads, pri, in taskq_create_impl() 86 taskq_create(const char *name, int nthreads, pri_t pri, int minalloc __unused, in taskq_create() argument 89 return (taskq_create_impl(name, nthreads, pri, system_proc, flags)); in taskq_create() 93 taskq_create_proc(const char *name, int nthreads, pri_t pri, int minalloc, in taskq_create_proc() argument 96 return (taskq_create_impl(name, nthreads, pri, proc, flags)); in taskq_create_proc()
|
| /freebsd-13.1/sys/mips/beri/ |
| H A D | beri_mp.c | 71 int ncores, ncpus, nthreads; in platform_cpu_mask() local 78 nthreads = beri_get_nthreads(); in platform_cpu_mask() 80 KASSERT(nthreads <= 0x10000, ("%s: too many threads %d", __func__, in platform_cpu_mask() 81 nthreads)); in platform_cpu_mask() 82 KASSERT(ncores < 0xffff || nthreads < 0xffff, in platform_cpu_mask() 84 nthreads)); in platform_cpu_mask() 85 ncpus = ncores * nthreads; in platform_cpu_mask() 90 ncores, nthreads); in platform_cpu_mask()
|
| /freebsd-13.1/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-13.1/sys/contrib/openzfs/include/os/linux/spl/sys/ |
| H A D | taskq.h | 160 #define taskq_create_proc(name, nthreads, pri, min, max, proc, flags) \ argument 161 taskq_create(name, nthreads, pri, min, max, flags) 162 #define taskq_create_sysdc(name, nthreads, min, max, proc, dc, flags) \ argument 163 taskq_create(name, nthreads, maxclsyspri, min, max, flags)
|
| /freebsd-13.1/sys/contrib/openzfs/module/os/freebsd/spl/ |
| H A D | spl_taskq.c | 212 taskq_create_impl(const char *name, int nthreads, pri_t pri, in taskq_create_impl() argument 218 nthreads = MAX((mp_ncpus * nthreads) / 100, 1); in taskq_create_impl() 227 (void) taskqueue_start_threads_in_proc(&tq->tq_queue, nthreads, pri, in taskq_create_impl() 234 taskq_create(const char *name, int nthreads, pri_t pri, int minalloc __unused, in taskq_create() argument 237 return (taskq_create_impl(name, nthreads, pri, system_proc, flags)); in taskq_create() 241 taskq_create_proc(const char *name, int nthreads, pri_t pri, in taskq_create_proc() argument 244 return (taskq_create_impl(name, nthreads, pri, proc, flags)); in taskq_create_proc()
|
| /freebsd-13.1/usr.bin/sort/ |
| H A D | radixsort.c | 106 if (sort_left == 0 && nthreads > 1) in sort_left_dec() 152 if (nthreads > 1) { in push_ls() 638 if (nthreads < 2) { in run_top_sort_level() 645 for(i = 0; i < nthreads; ++i) { in run_top_sort_level() 667 for (i = 0; i < nthreads; ++i) in run_top_sort_level() 679 size_t nthreads_save = nthreads; in run_sort() 681 nthreads = 1; in run_sort() 683 if (nthreads > 1) { in run_sort() 715 if (nthreads > 1) { in run_sort() 719 nthreads = nthreads_save; in run_sort()
|
| H A D | file.c | 1511 if (nthreads < 2 || list->count < MT_SORT_THRESHOLD) { in mt_sort() 1512 size_t nthreads_save = nthreads; in mt_sort() 1513 nthreads = 1; in mt_sort() 1521 nthreads = nthreads_save; in mt_sort() 1530 avgsize = list->count / nthreads; in mt_sort() 1536 for (i = 0; i < nthreads; ++i) { in mt_sort() 1544 sz = (i == nthreads - 1) ? list->count - cstart : in mt_sort() 1558 for (i = 0; i < nthreads; ++i) { in mt_sort() 1582 for (i = 0; i < nthreads; ++i) { in mt_sort() 1589 merge_list_parts(parts, nthreads, fn); in mt_sort() [all …]
|
| H A D | sort.c | 106 size_t nthreads = 1; variable 290 nthreads = ncpu; in set_hw_params() 1133 nthreads = (size_t)(atoi(optarg)); in main() 1134 if (nthreads < 1) in main() 1135 nthreads = 1; in main() 1136 if (nthreads > 1024) in main() 1137 nthreads = 1024; in main() 1234 nthreads = 1; in main() 1277 nthreads = 1; in main()
|
| H A D | sort.h | 61 extern size_t nthreads;
|
| /freebsd-13.1/sys/contrib/openzfs/module/os/linux/spl/ |
| H A D | spl-taskq.c | 1041 int nthreads = threads_arg; in taskq_create() local 1050 ASSERT(nthreads <= 100); in taskq_create() 1051 ASSERT(nthreads >= 0); in taskq_create() 1053 nthreads = MAX(nthreads, 0); in taskq_create() 1054 nthreads = MAX((num_online_cpus() * nthreads) /100, 1); in taskq_create() 1080 tq->tq_maxthreads = nthreads; in taskq_create() 1110 nthreads = 1; in taskq_create() 1308 nthreads = MAX(((num_online_cpus() + 1) * nthreads) / 100, 1); in spl_taskq_expand() 1309 tq->tq_maxthreads = nthreads; in spl_taskq_expand() 1342 nthreads = MAX(((num_online_cpus()) * nthreads) / 100, 1); in spl_taskq_prepare_down() [all …]
|
| /freebsd-13.1/sys/powerpc/powernv/ |
| H A D | platform_powernv.c | 451 int res, nthreads; in powernv_smp_probe_threads() local 463 nthreads = 1; in powernv_smp_probe_threads() 472 nthreads = res / sizeof(cell_t); in powernv_smp_probe_threads() 474 nthreads = 1; in powernv_smp_probe_threads() 478 smp_threads_per_core = nthreads; in powernv_smp_probe_threads() 479 if (mp_ncpus % nthreads == 0) in powernv_smp_probe_threads() 480 mp_ncores = mp_ncpus / nthreads; in powernv_smp_probe_threads()
|
| /freebsd-13.1/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-13.1/lib/libc/tests/resolv/ |
| H A D | resolv_test.c | 255 size_t nthreads = NTHREADS; in run_tests() local 275 threads = calloc(nthreads, sizeof(pthread_t)); in run_tests() 278 for (i = 0; i < nthreads; i++) { in run_tests() 282 for (i = 0; i < nthreads; i++) { in run_tests()
|
| /freebsd-13.1/contrib/llvm-project/openmp/runtime/src/ |
| H A D | kmp_tasking.cpp | 2900 nthreads = task_team->tt.tt_nproc; in __kmp_execute_tasks_template() 3070 if (nthreads == 1 && in __kmp_execute_tasks_template() 3133 int nthreads, i, is_init_thread; in __kmp_enable_tasking() local 3141 nthreads = task_team->tt.tt_nproc; in __kmp_enable_tasking() 3142 KMP_DEBUG_ASSERT(nthreads > 0); in __kmp_enable_tasking() 3164 for (i = 0; i < nthreads; i++) { in __kmp_enable_tasking() 3290 kmp_int32 nthreads, maxthreads; in __kmp_realloc_task_threads_data() local 3299 nthreads = task_team->tt.tt_nproc; in __kmp_realloc_task_threads_data() 3313 if (maxthreads < nthreads) { in __kmp_realloc_task_threads_data() 3411 int nthreads; in __kmp_allocate_task_team() local [all …]
|
| H A D | kmp_gsupport.cpp | 1951 int nthreads, in __kmp_GOMP_taskgroup_reduction_register() argument 1954 KMP_ASSERT(nthreads > 0); in __kmp_GOMP_taskgroup_reduction_register() 1961 data[2] = (uintptr_t)__kmp_allocate(nthreads * data[1]); in __kmp_GOMP_taskgroup_reduction_register() 1962 data[6] = data[2] + (nthreads * data[1]); in __kmp_GOMP_taskgroup_reduction_register() 1974 int nthreads = thread->th.th_team_nproc; in KMP_EXPAND_NAME() local 1975 __kmp_GOMP_taskgroup_reduction_register(data, tg, nthreads); in KMP_EXPAND_NAME()
|
| /freebsd-13.1/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-13.1/tools/tools/netmap/ |
| H A D | pkt-gen.c | 270 int nthreads; member 1320 if (targ->g->nthreads > 1) { in ping_body() 1500 if (targ->g->nthreads > 1) { in pong_body() 1948 if (targ->g->nthreads > 1) { in txseq_body() 2674 if (done == g->nthreads) in main_thread() 2844 g.nthreads = 1; in main() 2988 g.nthreads = atoi(optarg); in main() 3130 if (g.nthreads > 1) { in main() 3167 if (g.nthreads < 1 || g.nthreads > devqueues) { in main() 3209 g.nthreads, in main() [all …]
|
| /freebsd-13.1/usr.bin/sort/nls/ |
| H A D | C.msg | 16 …files0-from file] [--heapsort] [--mergesort] [--radixsort] [--qsort] [--nthreads thread_no] [--hum…
|
| H A D | hu_HU.ISO8859-2.msg | 16 …files0-from f�jl] [--heapsort] [--mergesort] [--radixsort] [--qsort] [--nthreads sz�lak_sz�ma] [--…
|
| /freebsd-13.1/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-13.1/sys/kern/ |
| H A D | kern_thread.c | 163 static __exclusive_cache_line int nthreads; variable 182 nthreads_new = atomic_fetchadd_int(&nthreads, 1) + 1; in thread_count_inc_try() 186 atomic_subtract_int(&nthreads, 1); in thread_count_inc_try() 221 atomic_subtract_int(&nthreads, n); in thread_count_sub()
|