1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-25 22:14:36 +00:00

Wait till the avalon_send_tasks thread has filled the avalon with idle work before starting the avalon_get_results thread.

This commit is contained in:
Con Kolivas 2013-05-26 14:29:28 +10:00
parent 7cf154bfa5
commit 0763070cb0

View File

@ -765,6 +765,10 @@ static bool avalon_prepare(struct thr_info *thr)
if (pthread_create(&info->read_thr, NULL, avalon_get_results, (void *)avalon))
quit(1, "Failed to create avalon read_thr");
mutex_lock(&info->qlock);
pthread_cond_wait(&info->qcond, &info->qlock);
mutex_unlock(&info->qlock);
avalon_init(avalon);
cgtime(&now);