1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-14 16:58:05 +00:00

cgsem_post after creating the thread info

This commit is contained in:
Con Kolivas 2013-06-09 16:38:57 +10:00
parent 065d4aabf6
commit 24398bde03

View File

@ -7177,13 +7177,6 @@ static void hotplug_process()
thr->cgpu = cgpu; thr->cgpu = cgpu;
thr->device_thread = j; thr->device_thread = j;
/* Enable threads for devices set not to mine but disable
* their queue in case we wish to enable them later */
if (cgpu->deven != DEV_DISABLED) {
applog(LOG_DEBUG, "Pushing sem post to thread %d", thr->id);
cgsem_post(&thr->sem);
}
if (cgpu->drv->thread_prepare && !cgpu->drv->thread_prepare(thr)) if (cgpu->drv->thread_prepare && !cgpu->drv->thread_prepare(thr))
continue; continue;
@ -7194,6 +7187,13 @@ static void hotplug_process()
cgpu->thr[j] = thr; cgpu->thr[j] = thr;
/* Enable threads for devices set not to mine but disable
* their queue in case we wish to enable them later */
if (cgpu->deven != DEV_DISABLED) {
applog(LOG_DEBUG, "Pushing sem post to thread %d", thr->id);
cgsem_post(&thr->sem);
}
mining_threads++; mining_threads++;
} }
total_devices++; total_devices++;
@ -7668,13 +7668,6 @@ begin_bench:
thr->cgpu = cgpu; thr->cgpu = cgpu;
thr->device_thread = j; thr->device_thread = j;
/* Enable threads for devices set not to mine but disable
* their queue in case we wish to enable them later */
if (cgpu->deven != DEV_DISABLED) {
applog(LOG_DEBUG, "Pushing sem post to thread %d", thr->id);
cgsem_post(&thr->sem);
}
if (!cgpu->drv->thread_prepare(thr)) if (!cgpu->drv->thread_prepare(thr))
continue; continue;
@ -7684,6 +7677,13 @@ begin_bench:
quit(1, "thread %d create failed", thr->id); quit(1, "thread %d create failed", thr->id);
cgpu->thr[j] = thr; cgpu->thr[j] = thr;
/* Enable threads for devices set not to mine but disable
* their queue in case we wish to enable them later */
if (cgpu->deven != DEV_DISABLED) {
applog(LOG_DEBUG, "Pushing sem post to thread %d", thr->id);
cgsem_post(&thr->sem);
}
} }
} }