From debe77767af0d6d74976e7b5d8f9463a89b2da9b Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Thu, 23 Jun 2011 21:23:46 +1000 Subject: [PATCH] Use cpu_from_thr_id when binding threads. --- cpu-miner.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cpu-miner.c b/cpu-miner.c index 007abd39..24abeec6 100644 --- a/cpu-miner.c +++ b/cpu-miner.c @@ -642,7 +642,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)) - affine_to_cpu(mythr->id, mythr->id % num_processors); + affine_to_cpu(cpu_from_thr_id(thr_id), thr_id % num_processors); while (1) { struct work work __attribute__((aligned(128))); @@ -1284,7 +1284,6 @@ int main (int argc, char *argv[]) sleep(1); /* don't pound RPC server all at once */ } - applog(LOG_INFO, "%d cpu miner threads started, " "using SHA256 '%s' algorithm.", opt_n_threads,