Lines Matching refs:conf

30 struct conf;
31 static bool early_test (struct conf *);
70 struct conf *conf; member
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()
99 CPU_SET_S (cpu, CPU_ALLOC_SIZE (param->conf->set_size), in thread_burn_any_cpu()
109 stop_and_join_threads (struct conf *conf, cpu_set_t *set, in stop_and_join_threads() argument
118 if (!CPU_ISSET_S (cpu, CPU_ALLOC_SIZE (conf->set_size), set)) in stop_and_join_threads()
134 if (!CPU_ISSET_S (cpu, CPU_ALLOC_SIZE (conf->set_size), set)) in stop_and_join_threads()
151 early_test (struct conf *conf) in early_test() argument
154 = calloc (conf->last_cpu + 1, sizeof (*pinned_threads)); in early_test()
156 = calloc (conf->last_cpu + 1, sizeof (*other_threads)); in early_test()
157 cpu_set_t *initial_set = CPU_ALLOC (conf->set_size); in early_test()
158 cpu_set_t *scratch_set = CPU_ALLOC (conf->set_size); in early_test()
166 if (getaffinity (CPU_ALLOC_SIZE (conf->set_size), initial_set) < 0) in early_test()
171 for (int cpu = 0; cpu <= conf->last_cpu; ++cpu) in early_test()
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()
178 other_threads[cpu].seen_set = CPU_ALLOC (conf->set_size); in early_test()
184 CPU_ZERO_S (CPU_ALLOC_SIZE (conf->set_size), in early_test()
198 for (int cpu = 0; cpu <= conf->last_cpu; ++cpu) in early_test()
200 if (!CPU_ISSET_S (cpu, CPU_ALLOC_SIZE (conf->set_size), initial_set)) in early_test()
202 CPU_ZERO_S (CPU_ALLOC_SIZE (conf->set_size), scratch_set); in early_test()
203 CPU_SET_S (cpu, CPU_ALLOC_SIZE (conf->set_size), scratch_set); in early_test()
205 (&attr, CPU_ALLOC_SIZE (conf->set_size), scratch_set); in early_test()
210 stop_and_join_threads (conf, initial_set, in early_test()
221 stop_and_join_threads (conf, initial_set, in early_test()
229 for (int cpu = 0; cpu <= conf->last_cpu; ++cpu) in early_test()
231 if (!CPU_ISSET_S (cpu, CPU_ALLOC_SIZE (conf->set_size), initial_set)) in early_test()
240 stop_and_join_threads (conf, initial_set, in early_test()
242 pinned_threads + conf->last_cpu + 1, in early_test()
250 main_thread.conf = conf; in early_test()
254 CPU_ZERO_S (CPU_ALLOC_SIZE (conf->set_size), main_thread.seen_set); in early_test()
256 stop_and_join_threads (conf, initial_set, in early_test()
258 pinned_threads + conf->last_cpu + 1, in early_test()
259 other_threads, other_threads + conf->last_cpu + 1); in early_test()
262 CPU_COUNT_S (CPU_ALLOC_SIZE (conf->set_size), scratch_set), in early_test()
263 CPU_COUNT_S (CPU_ALLOC_SIZE (conf->set_size), initial_set)); in early_test()
264 CPU_ZERO_S (CPU_ALLOC_SIZE (conf->set_size), scratch_set); in early_test()
265 for (int cpu = 0; cpu <= conf->last_cpu; ++cpu) in early_test()
267 if (!CPU_ISSET_S (cpu, CPU_ALLOC_SIZE (conf->set_size), initial_set)) in early_test()
269 CPU_OR_S (CPU_ALLOC_SIZE (conf->set_size), in early_test()
274 CPU_COUNT_S (CPU_ALLOC_SIZE (conf->set_size), scratch_set));; in early_test()