.. | .. |
---|
29 | 29 | #include <linux/time64.h> |
---|
30 | 30 | #include <errno.h> |
---|
31 | 31 | #include "futex.h" |
---|
32 | | -#include "cpumap.h" |
---|
| 32 | +#include <internal/cpumap.h> |
---|
| 33 | +#include <perf/cpumap.h> |
---|
33 | 34 | |
---|
34 | 35 | #include <err.h> |
---|
35 | 36 | #include <stdlib.h> |
---|
.. | .. |
---|
138 | 139 | } |
---|
139 | 140 | |
---|
140 | 141 | static void block_threads(pthread_t *w, pthread_attr_t thread_attr, |
---|
141 | | - struct cpu_map *cpu) |
---|
| 142 | + struct perf_cpu_map *cpu) |
---|
142 | 143 | { |
---|
143 | 144 | cpu_set_t cpuset; |
---|
144 | 145 | unsigned int i; |
---|
.. | .. |
---|
224 | 225 | struct sigaction act; |
---|
225 | 226 | pthread_attr_t thread_attr; |
---|
226 | 227 | struct thread_data *waking_worker; |
---|
227 | | - struct cpu_map *cpu; |
---|
| 228 | + struct perf_cpu_map *cpu; |
---|
228 | 229 | |
---|
229 | 230 | argc = parse_options(argc, argv, options, |
---|
230 | 231 | bench_futex_wake_parallel_usage, 0); |
---|
.. | .. |
---|
233 | 234 | exit(EXIT_FAILURE); |
---|
234 | 235 | } |
---|
235 | 236 | |
---|
| 237 | + memset(&act, 0, sizeof(act)); |
---|
236 | 238 | sigfillset(&act.sa_mask); |
---|
237 | 239 | act.sa_sigaction = toggle_done; |
---|
238 | 240 | sigaction(SIGINT, &act, NULL); |
---|
239 | 241 | |
---|
240 | | - cpu = cpu_map__new(NULL); |
---|
| 242 | + cpu = perf_cpu_map__new(NULL); |
---|
241 | 243 | if (!cpu) |
---|
242 | 244 | err(EXIT_FAILURE, "calloc"); |
---|
243 | 245 | |
---|
.. | .. |
---|
318 | 320 | print_summary(); |
---|
319 | 321 | |
---|
320 | 322 | free(blocked_worker); |
---|
| 323 | + perf_cpu_map__put(cpu); |
---|
321 | 324 | return ret; |
---|
322 | 325 | } |
---|
323 | 326 | #endif /* HAVE_PTHREAD_BARRIER */ |
---|