Lines Matching refs:i

28 typedef int (*create_fn)(int i);
29 typedef int (*join_fn)(int i);
45 for (int i = 0; i < NUM_CPUS; ++i) { in print_stats() local
46 printf("%s, %d, %u, %llu, 1, %llu\n", tag, i, UPDATE_INTERVAL_S, counters[i], in print_stats()
47 (counters[i] - prev_counters[i]) / UPDATE_INTERVAL_S); in print_stats()
48 prev_counters[i] = counters[i]; in print_stats()
56 for (int i = 0; i < NUM_CPUS; ++i) { in print_group_stats() local
57 count += counters[i]; in print_group_stats()
66 int i; in create_join_common() local
72 for (i = 0; i < NUM_CPUS; ++i) { in create_join_common()
74 prev_counters[i] = 0; in create_join_common()
75 ret = create(i); in create_join_common()
76 __ASSERT(ret == 0, "%s_create(%d)[%zu] failed: %d", tag, i, counters[i], ret); in create_join_common()
85 for (i = 0; i < NUM_CPUS; ++i) { in create_join_common()
86 if (alive[i]) { in create_join_common()
87 ret = join(i); in create_join_common()
88 __ASSERT(ret, "%s_join(%d)[%zu] failed: %d", tag, i, counters[i], in create_join_common()
90 alive[i] = false; in create_join_common()
93 ++counters[i]; in create_join_common()
101 ret = create(i); in create_join_common()
102 __ASSERT(ret == 0, "%s_create(%d)[%zu] failed: %d", tag, i, in create_join_common()
103 counters[i], ret); in create_join_common()
115 for (i = 0; IS_ENABLED(CONFIG_ASSERT) && i < NUM_CPUS; ++i) { in create_join_common()
116 __ASSERT(counters[i] > 0, "%s %d was never scheduled", tag, i); in create_join_common()
135 int i = POINTER_TO_INT(arg1); in k_thread_fun() local
137 alive[i] = true; in k_thread_fun()
140 static int k_thread_create_wrapper(int i) in k_thread_create_wrapper() argument
142 k_thread_create(&k_threads[i], thread_stacks[i], STACK_SIZE, k_thread_fun, in k_thread_create_wrapper()
143 INT_TO_POINTER(i), NULL, NULL, K_HIGHEST_APPLICATION_THREAD_PRIO, 0, in k_thread_create_wrapper()
149 static int k_thread_join_wrapper(int i) in k_thread_join_wrapper() argument
151 return k_thread_join(&k_threads[i], K_FOREVER); in k_thread_join_wrapper()
175 static int pthread_create_wrapper(int i) in pthread_create_wrapper() argument
177 return pthread_create(&pthreads[i], &pthread_attrs[i], pthread_fun, INT_TO_POINTER(i)); in pthread_create_wrapper()
180 static int pthread_join_wrapper(int i) in pthread_join_wrapper() argument
182 return pthread_join(pthreads[i], NULL); in pthread_join_wrapper()
211 for (int i = 0; i < NUM_CPUS; ++i) { in setup() local
212 ret = pthread_attr_init(&pthread_attrs[i]); in setup()
213 __ASSERT(ret == 0, "pthread_attr_init[%d] failed: %d", i, ret); in setup()
215 ret = pthread_attr_setstack(&pthread_attrs[i], thread_stacks[i], in setup()
217 __ASSERT(ret == 0, "pthread_attr_setstack[%d] failed: %d", i, ret); in setup()
219 ret = pthread_attr_setschedpolicy(&pthread_attrs[i], SCHED_FIFO); in setup()
220 __ASSERT(ret == 0, "pthread_attr_setschedpolicy[%d] failed: %d", i, ret); in setup()
222 ret = pthread_attr_setschedparam(&pthread_attrs[i], &param); in setup()
223 __ASSERT(ret == 0, "pthread_attr_setschedparam[%d] failed: %d", i, ret); in setup()
230 for (int i = 0; i < NUM_CPUS; ++i) { in before() local
231 counters[i] = 0; in before()