Do not set thread affinity on single-processor systems
This commit is contained in:
parent
5b82b834a6
commit
21cba02b78
1 changed files with 1 additions and 1 deletions
|
@ -540,7 +540,7 @@ static void *miner_thread(void *userdata)
|
||||||
|
|
||||||
/* Cpu affinity only makes sense if the number of threads is a multiple
|
/* Cpu affinity only makes sense if the number of threads is a multiple
|
||||||
* of the number of CPUs */
|
* 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);
|
affine_to_cpu(mythr->id, mythr->id % num_processors);
|
||||||
|
|
||||||
if (opt_algo == ALGO_SCRYPT)
|
if (opt_algo == ALGO_SCRYPT)
|
||||||
|
|
Loading…
Reference in a new issue