@@ -1013,12 +1013,12 @@ static void process_options(int argc, char *argv[], int max_cpus)
case 'a':
case OPT_AFFINITY:
if (optarg) {
- parse_cpumask(optarg, max_cpus, &affinity_mask);
+ parse_cpumask(optarg, &affinity_mask);
} else if (optind < argc &&
(atoi(argv[optind]) ||
argv[optind][0] == '0' ||
argv[optind][0] == '!')) {
- parse_cpumask(argv[optind], max_cpus, &affinity_mask);
+ parse_cpumask(argv[optind], &affinity_mask);
}
break;
case 'A':
@@ -7,6 +7,6 @@
int get_available_cpus(struct bitmask *cpumask);
int cpu_for_thread(int thread_num, int max_cpus, struct bitmask *cpumask);
-int parse_cpumask(char *str, int max_cpus, struct bitmask **cpumask);
+int parse_cpumask(char *str, struct bitmask **cpumask);
#endif
@@ -85,7 +85,7 @@ int cpu_for_thread(int thread_num, int max_cpus, struct bitmask *cpumask)
* the user supplied affinity mask and the affinity mask from the run
* time environment
*/
-static void use_current_cpuset(int max_cpus, struct bitmask *cpumask)
+static void use_current_cpuset(struct bitmask *cpumask)
{
struct bitmask *curmask;
int i;
@@ -106,7 +106,7 @@ static void use_current_cpuset(int max_cpus, struct bitmask *cpumask)
numa_bitmask_free(curmask);
}
-int parse_cpumask(char *str, int max_cpus, struct bitmask **cpumask)
+int parse_cpumask(char *str, struct bitmask **cpumask)
{
struct bitmask *mask;
@@ -120,7 +120,7 @@ int parse_cpumask(char *str, int max_cpus, struct bitmask **cpumask)
return 0;
}
- use_current_cpuset(max_cpus, mask);
+ use_current_cpuset(mask);
*cpumask = mask;
return 0;
@@ -716,7 +716,6 @@ int main(int argc, char *argv[])
struct thread *threads;
int i, n_cores;
struct bitmask *cpu_set = NULL;
- int max_cpus = sysconf(_SC_NPROCESSORS_ONLN);
#ifdef FRC_MISSING
printf("This architecture is not yet supported. "
@@ -743,7 +742,7 @@ int main(int argc, char *argv[])
if (!g.cpu_list)
g.cpu_list = strdup("all");
- if (parse_cpumask(g.cpu_list, max_cpus, &cpu_set))
+ if (parse_cpumask(g.cpu_list, &cpu_set))
exit(1);
n_cores = numa_bitmask_weight(cpu_set);
@@ -236,12 +236,12 @@ static void process_options(int argc, char *argv[], unsigned int max_cpus)
switch (c) {
case 'a':
if (optarg) {
- parse_cpumask(optarg, max_cpus, &affinity_mask);
+ parse_cpumask(optarg, &affinity_mask);
} else if (optind < argc &&
(atoi(argv[optind]) ||
argv[optind][0] == '0' ||
argv[optind][0] == '!')) {
- parse_cpumask(argv[optind], max_cpus, &affinity_mask);
+ parse_cpumask(argv[optind], &affinity_mask);
}
if (verbose)
Remove usused max_cpus argument from parse_cpumask(). Reviewed-by: Daniel Wagner <dwagner@suse.de> --- src/cyclictest/cyclictest.c | 4 ++-- src/include/rt-numa.h | 2 +- src/lib/rt-numa.c | 6 +++--- src/oslat/oslat.c | 3 +-- src/signaltest/signaltest.c | 4 ++-- 5 files changed, 9 insertions(+), 10 deletions(-)