Lines Matching refs:cpus
11 struct cpu_map *cpus; in cpu_map__default_new() local
18 cpus = malloc(sizeof(*cpus) + nr_cpus * sizeof(int)); in cpu_map__default_new()
19 if (cpus != NULL) { in cpu_map__default_new()
22 cpus->map[i] = i; in cpu_map__default_new()
24 cpus->nr = nr_cpus; in cpu_map__default_new()
27 return cpus; in cpu_map__default_new()
33 struct cpu_map *cpus = malloc(sizeof(*cpus) + payload_size); in cpu_map__trim_new() local
35 if (cpus != NULL) { in cpu_map__trim_new()
36 cpus->nr = nr_cpus; in cpu_map__trim_new()
37 memcpy(cpus->map, tmp_cpus, payload_size); in cpu_map__trim_new()
40 return cpus; in cpu_map__trim_new()
45 struct cpu_map *cpus = NULL; in cpu_map__read() local
90 cpus = cpu_map__trim_new(nr_cpus, tmp_cpus); in cpu_map__read()
92 cpus = cpu_map__default_new(); in cpu_map__read()
95 return cpus; in cpu_map__read()
100 struct cpu_map *cpus = NULL; in cpu_map__read_all_cpu_map() local
107 cpus = cpu_map__read(onlnf); in cpu_map__read_all_cpu_map()
109 return cpus; in cpu_map__read_all_cpu_map()
114 struct cpu_map *cpus = NULL; in cpu_map__new() local
170 cpus = cpu_map__trim_new(nr_cpus, tmp_cpus); in cpu_map__new()
172 cpus = cpu_map__default_new(); in cpu_map__new()
176 return cpus; in cpu_map__new()
192 struct cpu_map *cpus = malloc(sizeof(*cpus) + sizeof(int)); in cpu_map__dummy_new() local
194 if (cpus != NULL) { in cpu_map__dummy_new()
195 cpus->nr = 1; in cpu_map__dummy_new()
196 cpus->map[0] = -1; in cpu_map__dummy_new()
199 return cpus; in cpu_map__dummy_new()
240 static int cpu_map__build_map(struct cpu_map *cpus, struct cpu_map **res, in cpu_map__build_map() argument
244 int nr = cpus->nr; in cpu_map__build_map()
253 s1 = f(cpus, cpu); in cpu_map__build_map()
311 int cpu_map__build_socket_map(struct cpu_map *cpus, struct cpu_map **sockp) in cpu_map__build_socket_map() argument
313 return cpu_map__build_map(cpus, sockp, cpu_map__get_socket); in cpu_map__build_socket_map()
316 int cpu_map__build_core_map(struct cpu_map *cpus, struct cpu_map **corep) in cpu_map__build_core_map() argument
318 return cpu_map__build_map(cpus, corep, cpu_map__get_core); in cpu_map__build_core_map()