1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-03-13 06:01:03 +00:00

fix compile without ADL

This commit is contained in:
Jan Berdajs 2014-06-06 13:52:59 +02:00
parent 518d6e9eca
commit 6152638dd7

View File

@ -6280,9 +6280,13 @@ static void get_work_prepare_thread(struct thr_info *mythr, struct work *work)
if (!soft_restart) {
unsigned int n_threads = 0;
pthread_t restart_thr;
set_gpu_threads(work->pool->gpu_threads);
for (i = 0; i < total_devices; ++i)
n_threads += devices[i]->threads;
#ifdef HAVE_ADL
set_gpu_threads(work->pool->gpu_threads);
for (i = 0; i < total_devices; ++i)
n_threads += devices[i]->threads;
#else
n_threads = mining_threads;
#endif
if (unlikely(pthread_create(&restart_thr, NULL, restart_mining_threads_thread, (void *)n_threads)))
quit(1, "restart_mining_threads create thread failed");