Lines Matching refs:cpu

51   int cpu = (uintptr_t) closure;  in thread_burn_one_cpu()  local
55 if (sched_getcpu () != cpu) in thread_burn_one_cpu()
58 cpu, current); in thread_burn_one_cpu()
89 int cpu = sched_getcpu (); in thread_burn_any_cpu() local
90 if (cpu > param->conf->last_cpu in thread_burn_any_cpu()
91 || !CPU_ISSET_S (cpu, CPU_ALLOC_SIZE (param->conf->set_size), in thread_burn_any_cpu()
95 param->thread, cpu); in thread_burn_any_cpu()
99 CPU_SET_S (cpu, CPU_ALLOC_SIZE (param->conf->set_size), in thread_burn_any_cpu()
117 int cpu = p - pinned_first; in stop_and_join_threads() local
118 if (!CPU_ISSET_S (cpu, CPU_ALLOC_SIZE (conf->set_size), set)) in stop_and_join_threads()
124 printf ("error: Failed to join thread %d: %s\n", cpu, strerror (ret)); in stop_and_join_threads()
133 int cpu = p - other_first; in stop_and_join_threads() local
134 if (!CPU_ISSET_S (cpu, CPU_ALLOC_SIZE (conf->set_size), set)) in stop_and_join_threads()
140 printf ("error: Failed to join thread %d: %s\n", cpu, strerror (ret)); in stop_and_join_threads()
171 for (int cpu = 0; cpu <= conf->last_cpu; ++cpu) in early_test() local
173 if (!CPU_ISSET_S (cpu, CPU_ALLOC_SIZE (conf->set_size), initial_set)) in early_test()
175 other_threads[cpu].conf = conf; in early_test()
176 other_threads[cpu].initial_set = initial_set; in early_test()
177 other_threads[cpu].thread = cpu; in early_test()
178 other_threads[cpu].seen_set = CPU_ALLOC (conf->set_size); in early_test()
179 if (other_threads[cpu].seen_set == NULL) in early_test()
185 other_threads[cpu].seen_set); in early_test()
198 for (int cpu = 0; cpu <= conf->last_cpu; ++cpu) in early_test() local
200 if (!CPU_ISSET_S (cpu, CPU_ALLOC_SIZE (conf->set_size), initial_set)) in early_test()
203 CPU_SET_S (cpu, CPU_ALLOC_SIZE (conf->set_size), scratch_set); in early_test()
209 cpu, strerror (ret)); in early_test()
211 pinned_threads, pinned_threads + cpu, in early_test()
215 ret = pthread_create (pinned_threads + cpu, &attr, in early_test()
216 thread_burn_one_cpu, (void *) (uintptr_t) cpu); in early_test()
220 cpu, strerror (ret)); in early_test()
222 pinned_threads, pinned_threads + cpu, in early_test()
229 for (int cpu = 0; cpu <= conf->last_cpu; ++cpu) in early_test() local
231 if (!CPU_ISSET_S (cpu, CPU_ALLOC_SIZE (conf->set_size), initial_set)) in early_test()
233 ret = pthread_create (&other_threads[cpu].self, in early_test()
235 thread_burn_any_cpu, other_threads + cpu); in early_test()
239 cpu, strerror (ret)); in early_test()
243 other_threads, other_threads + cpu); in early_test()
265 for (int cpu = 0; cpu <= conf->last_cpu; ++cpu) in early_test() local
267 if (!CPU_ISSET_S (cpu, CPU_ALLOC_SIZE (conf->set_size), initial_set)) in early_test()
270 scratch_set, scratch_set, other_threads[cpu].seen_set); in early_test()
271 CPU_FREE (other_threads[cpu].seen_set); in early_test()