From eb36f8d271f5c3644718d2c9ef9d806625b4475c Mon Sep 17 00:00:00 2001 From: ckolivas Date: Sun, 24 Jun 2012 00:12:11 +1000 Subject: [PATCH] Walk through the thread list instead of searching for them when disabling threads for dynamic mode. --- driver-opencl.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/driver-opencl.c b/driver-opencl.c index 521a0635..9dbaef1a 100644 --- a/driver-opencl.c +++ b/driver-opencl.c @@ -538,15 +538,11 @@ struct cgpu_info *cpus; void pause_dynamic_threads(int gpu) { struct cgpu_info *cgpu = &gpus[gpu]; - int i, thread_no = 0; + int i; - for (i = 0; i < mining_threads; i++) { + for (i = 1; i < cgpu->threads; i++) { struct thr_info *thr = &thr_info[i]; - if (thr->cgpu != cgpu) - continue; - if (!thread_no++) - continue; if (!thr->pause && cgpu->dynamic) { applog(LOG_WARNING, "Disabling extra threads due to dynamic mode."); applog(LOG_WARNING, "Tune dynamic intensity with --gpu-dyninterval");