| /xnu-11215/tests/ |
| H A D | testposixshm.c | 14 static int nthreads = 0; variable 91 nthreads = ncpu; in create_threads() 97 for (i = 0; i < nthreads; i++) { in create_threads() 185 while (pass_count + fail_count < nthreads) { 189 T_EXPECT_EQ(fail_count, nthreads - 1, "racing shm_open()"); 195 while (pass_count + fail_count < nthreads) { 199 T_EXPECT_EQ(fail_count, nthreads - 1, "racing ftruncate()"); 205 while (pass_count + fail_count < nthreads) { 209 T_EXPECT_EQ(fail_count, nthreads - 1, "racing fclose()"); 215 while (pass_count + fail_count < nthreads) { [all …]
|
| H A D | select_stress.c | 77 int nthreads; member 166 int nthreads; member 217 for (int i = 0; i < sarg->nthreads; i++) { in do_select() 231 test_select_stress(int nthreads, uint64_t duration_seconds) in test_select_stress() argument 241 if (nthreads < 2) { in test_select_stress() 243 nthreads = 2; in test_select_stress() 249 th = calloc(nthreads, sizeof(*th)); in test_select_stress() 259 for (int i = 0; i < nthreads; i++) { in test_select_stress() 272 while (started_threads < nthreads) { in test_select_stress() 300 for (int i = 0; i < nthreads; i++) { in test_select_stress() [all …]
|
| H A D | perf_exit_proc.c | 18 run_additional_threads(int nthreads) in run_additional_threads() argument 20 for (int i = 0; i < nthreads; i++) { in run_additional_threads() 72 int nthreads = 0; in main() local 77 nthreads = (int)strtoul(argv[1], NULL, 10); in main() 88 err = run_additional_threads(nthreads); in main()
|
| H A D | tcp_input_outputopts_uaf_56155583.c | 69 int nthreads = 0; variable 81 if (pthread_create(&threads[nthreads++], NULL, setopt_thread, &s)) { 87 if (pthread_create(&threads[nthreads++], NULL, connect_thread, &sin6)) { 99 for (n = 0; n < nthreads; ++n) {
|
| H A D | perf_vmfault.c | 427 int nthreads; variable 431 nthreads = (int)strtol(e, NULL, 0); 433 nthreads = get_ncpu(); 434 if (nthreads == 1) { 438 setup_and_run_test(SOFT_FAULT, nthreads); 452 int nthreads; variable 456 nthreads = (int)strtol(e, NULL, 0); 458 nthreads = get_ncpu(); 459 if (nthreads == 1) { 463 setup_and_run_test(ZERO_FILL, nthreads);
|
| H A D | task_vm_info_decompressions.c | 120 create_threads(int nthreads, pthread_t *threads, struct thread_args *targs) in create_threads() argument 128 for (i = 0; i < nthreads; i++) { in create_threads() 138 join_threads(int nthreads, pthread_t *threads) in join_threads() argument 143 for (i = 0; i < nthreads; i++) { in join_threads()
|
| H A D | arm_matrix.c | 220 uint32_t nthreads = ncpu * 2; in test_on_each_cpu() local 221 barrier = nthreads; in test_on_each_cpu() 222 struct test_thread *threads = calloc(nthreads, sizeof(threads[0])); in test_on_each_cpu() 223 for (uint32_t i = 0; i < nthreads; i++) { in test_on_each_cpu() 233 for (uint32_t i = 0; i < nthreads; i++) { in test_on_each_cpu()
|
| H A D | setitimer.c | 91 static uint32_t nthreads; variable 166 nthreads = nworkers + 1; 171 T_LOG("nthreads = %d\n", nthreads); 189 for (uint32_t i = 0; i < nthreads; i++) { 210 for (uint32_t i = 1; i < nthreads; i++) { 215 for (uint32_t i = 0; i < nthreads; i++) { 322 for (uint32_t i = 1; i < nthreads; i++) { 390 for (uint32_t i = 0; i < nthreads; i++) {
|
| H A D | perf_exit.c | 59 void run_exit_test(int proc_wired_mem, int nthreads); 73 create_stat(int proc_wired_mem, int nthreads) in create_stat() argument 78 dt_stat_set_variable((dt_stat_t)dst, "proc_threads", nthreads); in create_stat()
|
| H A D | turnstile_multihop.c | 93 int nthreads; in sched_create_load_at_qos() local 105 nthreads = ncpu; in sched_create_load_at_qos() 106 T_QUIET; T_LOG("%s: Will create %d threads\n", __FUNCTION__, nthreads); in sched_create_load_at_qos() 122 context->thread_count = nthreads; in sched_create_load_at_qos() 124 context->threads = calloc((unsigned int)nthreads, sizeof(pthread_t)); in sched_create_load_at_qos() 128 for (i = 0; i < nthreads; i++) { in sched_create_load_at_qos()
|
| /xnu-11215/osfmk/kern/ |
| H A D | sched_average.c | 200 uint32_t nthreads = load_now[TH_BUCKET_RUN]; in compute_sched_load() local 215 uint32_t timeshare_threads = (nthreads - nfixpri); in compute_sched_load() 288 uint32_t nthreads = os_atomic_load(&sched_run_buckets[TH_BUCKET_RUN], relaxed) - 1; in compute_averages() local 306 sched_nrun = nthreads; in compute_averages() 312 uint32_t average_now = nthreads * LOAD_SCALE; in compute_averages() 315 if (nthreads > ncpus) { in compute_averages() 316 factor_now = (ncpus * LOAD_SCALE) / (nthreads + 1); in compute_averages() 318 factor_now = (ncpus - nthreads) * LOAD_SCALE; in compute_averages()
|
| H A D | waitq.c | 805 uint32_t nthreads; member 1014 if (++args->nthreads >= args->max_threads) { in waitq_queue_iterate_locked() 1088 if (++args->nthreads >= args->max_threads) { in waitq_prioq_iterate_locked() 1243 if (args->nthreads == 0) { in do_waitq_select_n_locked_sets() 1261 if (args->nthreads >= args->max_threads) { in do_waitq_select_n_locked_sets() 1283 if (args->nthreads >= args->max_threads) { in do_waitq_select_n_locked() 1537 waitq_stats_count_wakeup(waitq, args.nthreads); in waitq_wakeup64_all_locked() 1551 if (args.nthreads > 0) { in waitq_wakeup64_all_locked() 1580 waitq_stats_count_wakeup(waitq, args.nthreads); in waitq_wakeup64_one_locked() 1594 if (args.nthreads > 0) { in waitq_wakeup64_one_locked() [all …]
|
| /xnu-11215/tools/tests/TLBcoherency/ |
| H A D | TLBcoherency.c | 252 unsigned nthreads = NTHREADS; in main() local 262 nthreads = atoi(optarg); in main() 292 …_on_failure: %u, dosyscall: %u, mappingsize: 0x%x\n", page_linger_time, nthreads, arenasize, sleep… in main() 299 for (int dex = 0; dex < nthreads; dex++) { in main() 311 for (int dex = 0; dex < nthreads; dex++) { in main()
|
| /xnu-11215/osfmk/tests/ |
| H A D | pmap_tests.c | 552 volatile unsigned int nthreads; member 585 if (os_atomic_dec(&args->nthreads, relaxed) == 0) { in hugepv_remove_enter_thread() 614 if (os_atomic_dec(&args->nthreads, relaxed) == 0) { in hugepv_fast_fault_thread() 637 if (os_atomic_dec(&args->nthreads, relaxed) == 0) { in hugepv_cache_attr_thread() 741 .nthreads = 0, .num_mappings = num_mappings, .panic_callout = huge_pv_panic_call in test_pmap_huge_pv_list() 751 ++args.nthreads; in test_pmap_huge_pv_list() 759 ++args.nthreads; in test_pmap_huge_pv_list() 767 ++args.nthreads; in test_pmap_huge_pv_list() 803 while (os_atomic_load_exclusive(&args.nthreads, relaxed) != 0) { in test_pmap_huge_pv_list() 807 } else if (args.nthreads > 0) { in test_pmap_huge_pv_list() [all …]
|
| H A D | kernel_tests.c | 1025 unsigned int nthreads; member 1034 info->nthreads = nthreads; in init_synch_test_common() 1059 for (i = 0; i < info->nthreads; i++) { in start_threads() 1068 for (i = 0; i < info->nthreads; i++) { in start_threads() 1105 for (i = 0; i < info->nthreads; i++) { in wait_for_waiters() 1144 for (i = 0; i < info->nthreads; i++) { in exclude_current_waiter() 2333 info->value = info->head.nthreads; in test_cache_reflock() 2445 info->value = info->head.nthreads; in test_no_inheritor() 2455 info->value = info->head.nthreads; in test_rw_lock() 2467 info->value = info->head.nthreads; in test_mtx_lock() [all …]
|
| /xnu-11215/bsd/skywalk/lib/ |
| H A D | cuckoo_hashtable_test.c | 609 uint32_t nthreads = MAX(2, ml_wait_max_cpus() * 3 / 4); in cht_concurrent_tests() local 611 SK_ERR("start, nthreads %d", nthreads); in cht_concurrent_tests() 617 chth_nthreads = nthreads; in cht_concurrent_tests() 618 chth_confs = sk_alloc_type_array(struct cht_thread_conf, nthreads, in cht_concurrent_tests() 622 for (uint32_t i = 0; i < nthreads; i++) { in cht_concurrent_tests() 623 chth_confs[i].ctc_nthreads = nthreads; in cht_concurrent_tests() 638 } while (chth_cnt < nthreads); in cht_concurrent_tests() 639 VERIFY(chth_cnt == nthreads); in cht_concurrent_tests()
|
| /xnu-11215/tests/ktrace/ |
| H A D | kperf_tests.c | 146 int nthreads = ncpus - 1; variable 148 T_ASSERT_LT(nthreads, MAX_THREADS, 188 for (int i = 0; i < nthreads; i++) { 332 for (int i = 0; i < nthreads; i++) { 340 T_LOG("spun up %d thread%s", nthreads, nthreads == 1 ? "" : "s");
|
| /xnu-11215/bsd/kern/ |
| H A D | kdebug.c | 1485 _resolve_threads(kd_threadmap *map, vm_size_t nthreads) in _resolve_threads() argument 1488 .krs_map = map, .krs_count = 0, .krs_maxcount = nthreads, in _resolve_threads() 1510 vm_size_t nthreads = threads_count; in _thread_map_create_live() local 1513 if (os_add_overflow(nthreads, nthreads / 4, &nthreads)) { in _thread_map_create_live() 1517 *mapcount = nthreads; in _thread_map_create_live() 1518 if (os_mul_overflow(nthreads, sizeof(kd_threadmap), mapsize)) { in _thread_map_create_live() 1524 if (maxthreads != 0 && maxthreads < nthreads) { in _thread_map_create_live() 1532 *mapcount = _resolve_threads(thread_map, nthreads); in _thread_map_create_live()
|
| /xnu-11215/bsd/skywalk/nexus/flowswitch/ |
| H A D | fsw.c | 271 uint32_t nthreads; variable 276 sizeof(fsw->fsw_rps_nthreads), &nthreads, &changed); 278 error = fsw_rps_set_nthreads(fsw, nthreads);
|