1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-10 23:08:07 +00:00

GPU Initialization update

Moved the GPU initialization block to happen when a pool is actually switched to. Sometimes the first pool alive isn't the first pool switched to. This would result in unnecessary kernel loading if the first pool detected alive isn't used right away.
This commit is contained in:
ystarnaud 2014-06-23 17:20:26 -04:00
parent 76287736e2
commit 212009a48a

View File

@ -4072,8 +4072,6 @@ void switch_pools(struct pool *selected)
applog(LOG_WARNING, "Switching to %s", get_pool_name(pool));
if (pool_localgen(pool) || opt_fail_only)
clear_pool_work(last_pool);
}
}
//if startup, initialize gpus and start mining threads
if(startup)
@ -4085,6 +4083,8 @@ void switch_pools(struct pool *selected)
apply_initial_gpu_settings(pool);
gpu_initialized = true; //gpus initialized
}
}
}
mutex_lock(&lp_lock);
pthread_cond_broadcast(&lp_cond);