From 21cba02b78ce85d7cfe5903cf0ceaa0dbb014c25 Mon Sep 17 00:00:00 2001 From: pooler Date: Sat, 2 Jun 2012 14:45:07 +0200 Subject: [PATCH] Do not set thread affinity on single-processor systems --- cpu-miner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu-miner.c b/cpu-miner.c index 128bcd6..6bacef7 100644 --- a/cpu-miner.c +++ b/cpu-miner.c @@ -540,7 +540,7 @@ static void *miner_thread(void *userdata) /* Cpu affinity only makes sense if the number of threads is a multiple * of the number of CPUs */ - if (!(opt_n_threads % num_processors)) + if (num_processors > 1 && opt_n_threads % num_processors == 0) affine_to_cpu(mythr->id, mythr->id % num_processors); if (opt_algo == ALGO_SCRYPT)