Home | History | Annotate | Download | only in util

Lines Matching defs:nr_cpus

10 	int nr_cpus;
12 nr_cpus = sysconf(_SC_NPROCESSORS_ONLN);
13 if (nr_cpus < 0)
16 cpus = malloc(sizeof(*cpus) + nr_cpus * sizeof(int));
19 for (i = 0; i < nr_cpus; ++i)
22 cpus->nr = nr_cpus;
28 static struct cpu_map *cpu_map__trim_new(int nr_cpus, int *tmp_cpus)
30 size_t payload_size = nr_cpus * sizeof(int);
34 cpus->nr = nr_cpus;
45 int nr_cpus = 0;
62 int new_max = nr_cpus + cpu - prev - 1;
73 tmp_cpus[nr_cpus++] = prev;
75 if (nr_cpus == max_entries) {
83 tmp_cpus[nr_cpus++] = cpu;
92 if (nr_cpus > 0)
93 cpus = cpu_map__trim_new(nr_cpus, tmp_cpus);
107 int i, nr_cpus = 0;
140 for (i = 0; i < nr_cpus; i++)
144 if (nr_cpus == max_entries) {
151 tmp_cpus[nr_cpus++] = (int)start_cpu;
159 if (nr_cpus > 0)
160 cpus = cpu_map__trim_new(nr_cpus, tmp_cpus);