Lines Matching refs:i
70 unsigned int i; in start_threads() local
75 for (i = 0; i < CONFIG_MP_MAX_NUM_CPUS - 1; i++) { in start_threads()
76 k_thread_create(&busy_thread[i], busy_stack[i], BUSY_STACK_SIZE, in start_threads()
83 for (i = 0; i < CONFIG_BENCHMARK_NUM_THREADS; i++) { in start_threads()
84 k_thread_create(&test_thread[i], test_stack, TEST_STACK_SIZE, in start_threads()
85 test_entry, (void *)(uintptr_t)i, NULL, NULL, in start_threads()
86 i / bucket_size, 0, K_NO_WAIT); in start_threads()
92 unsigned int i; in cycles_reset() local
94 for (i = 0; i < num_threads; i++) { in cycles_reset()
95 add_cycles[i] = 0ULL; in cycles_reset()
96 remove_cycles[i] = 0ULL; in cycles_reset()
102 unsigned int i; in test_decreasing_priority() local
106 for (i = num_threads; i > 0; i--) { in test_decreasing_priority()
108 z_unready_thread(&test_thread[i - 1]); in test_decreasing_priority()
110 remove_cycles[i - 1] += timing_cycles_get(&start, &finish); in test_decreasing_priority()
113 for (i = 0; i < num_threads; i++) { in test_decreasing_priority()
115 z_ready_thread(&test_thread[i]); in test_decreasing_priority()
117 add_cycles[i] += timing_cycles_get(&start, &finish); in test_decreasing_priority()
123 unsigned int i; in test_increasing_priority() local
127 for (i = num_threads; i > 0; i--) { in test_increasing_priority()
129 z_unready_thread(&test_thread[num_threads - i]); in test_increasing_priority()
131 remove_cycles[i - 1] += timing_cycles_get(&start, &finish); in test_increasing_priority()
134 for (i = num_threads; i > 0; i--) { in test_increasing_priority()
136 z_ready_thread(&test_thread[i - 1]); in test_increasing_priority()
138 add_cycles[num_threads - i] += timing_cycles_get(&start, &finish); in test_increasing_priority()
164 unsigned int i; in compute_and_report_stats() local
166 for (i = 1; i < num_threads; i++) { in compute_and_report_stats()
167 if (cycles[i] > maximum) { in compute_and_report_stats()
168 maximum = cycles[i]; in compute_and_report_stats()
171 if (cycles[i] < minimum) { in compute_and_report_stats()
172 minimum = cycles[i]; in compute_and_report_stats()
175 total += cycles[i]; in compute_and_report_stats()
182 for (i = 0; i < num_threads; i++) { in compute_and_report_stats()
183 tmp = cycles[i] / num_iterations; in compute_and_report_stats()
227 unsigned int i; in main() local
252 for (i = 0; i < CONFIG_BENCHMARK_NUM_ITERATIONS; i++) { in main()
261 for (i = 0; i < CONFIG_BENCHMARK_NUM_THREADS; i++) { in main()
263 "ReadyQ.add.to.tail.%04u.waiters", i); in main()
265 tag, test_thread[i].base.prio); in main()
266 PRINT_STATS_AVG(description, (uint32_t)add_cycles[i], in main()
276 for (i = 0; i < CONFIG_BENCHMARK_NUM_THREADS; i++) { in main()
278 "ReadyQ.remove.from.head.%04u.waiters", i); in main()
281 tag, test_thread[i].base.prio); in main()
282 PRINT_STATS_AVG(description, (uint32_t)remove_cycles[i], in main()
289 for (i = 0; i < CONFIG_BENCHMARK_NUM_ITERATIONS; i++) { in main()
298 for (i = 0; i < CONFIG_BENCHMARK_NUM_THREADS; i++) { in main()
300 "ReadyQ.add.to.head.%04u.waiters", i); in main()
301 thread = &test_thread[CONFIG_BENCHMARK_NUM_THREADS - i - 1]; in main()
305 PRINT_STATS_AVG(description, (uint32_t)add_cycles[i], in main()
315 for (i = 0; i < CONFIG_BENCHMARK_NUM_THREADS; i++) { in main()
318 CONFIG_BENCHMARK_NUM_THREADS - i); in main()
319 thread = &test_thread[CONFIG_BENCHMARK_NUM_THREADS - i - 1]; in main()
323 PRINT_STATS_AVG(description, (uint32_t)remove_cycles[i], in main()
328 for (i = 0; i < CONFIG_BENCHMARK_NUM_THREADS; i++) { in main()
329 k_thread_abort(&test_thread[i]); in main()