Lines Matching refs:cpus
9 struct cpu_map *cpus; in cpu_map__default_new() local
16 cpus = malloc(sizeof(*cpus) + nr_cpus * sizeof(int)); in cpu_map__default_new()
17 if (cpus != NULL) { in cpu_map__default_new()
20 cpus->map[i] = i; in cpu_map__default_new()
22 cpus->nr = nr_cpus; in cpu_map__default_new()
25 return cpus; in cpu_map__default_new()
31 struct cpu_map *cpus = malloc(sizeof(*cpus) + payload_size); in cpu_map__trim_new() local
33 if (cpus != NULL) { in cpu_map__trim_new()
34 cpus->nr = nr_cpus; in cpu_map__trim_new()
35 memcpy(cpus->map, tmp_cpus, payload_size); in cpu_map__trim_new()
38 return cpus; in cpu_map__trim_new()
43 struct cpu_map *cpus = NULL; in cpu_map__read_all_cpu_map() local
93 cpus = cpu_map__trim_new(nr_cpus, tmp_cpus); in cpu_map__read_all_cpu_map()
95 cpus = cpu_map__default_new(); in cpu_map__read_all_cpu_map()
99 return cpus; in cpu_map__read_all_cpu_map()
104 struct cpu_map *cpus = NULL; in cpu_map__new() local
160 cpus = cpu_map__trim_new(nr_cpus, tmp_cpus); in cpu_map__new()
162 cpus = cpu_map__default_new(); in cpu_map__new()
166 return cpus; in cpu_map__new()
171 struct cpu_map *cpus = malloc(sizeof(*cpus) + sizeof(int)); in cpu_map__dummy_new() local
173 if (cpus != NULL) { in cpu_map__dummy_new()
174 cpus->nr = 1; in cpu_map__dummy_new()
175 cpus->map[0] = -1; in cpu_map__dummy_new()
178 return cpus; in cpu_map__dummy_new()