aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/bench/futex-wake.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/bench/futex-wake.c')
-rw-r--r--tools/perf/bench/futex-wake.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/bench/futex-wake.c b/tools/perf/bench/futex-wake.c
index e8181ad7d088..e62006342b18 100644
--- a/tools/perf/bench/futex-wake.c
+++ b/tools/perf/bench/futex-wake.c
@@ -42,7 +42,7 @@ static bool done = false, silent = false, fshared = false;
static pthread_mutex_t thread_lock;
static pthread_cond_t thread_parent, thread_worker;
static struct stats waketime_stats, wakeup_stats;
-static unsigned int ncpus, threads_starting, nthreads = 0;
+static unsigned int threads_starting, nthreads = 0;
static int futex_flag = 0;
static const struct option options[] = {
@@ -140,7 +140,7 @@ int bench_futex_wake(int argc, const char **argv)
sigaction(SIGINT, &act, NULL);
if (!nthreads)
- nthreads = ncpus;
+ nthreads = cpu->nr;
worker = calloc(nthreads, sizeof(*worker));
if (!worker)