mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 20:44:19 +00:00
Unset the work restart flag sooner in avalon_flush_work to avoid re-entering the flush work function and just reset the queued counter instead of rotating the array to avoid runs of no valid work.
This commit is contained in:
parent
0a9d7ca6b3
commit
e90cf62af1
@ -972,12 +972,13 @@ static void avalon_flush_work(struct cgpu_info *avalon)
|
|||||||
struct avalon_info *info = avalon->device_data;
|
struct avalon_info *info = avalon->device_data;
|
||||||
struct thr_info *thr = info->thr;
|
struct thr_info *thr = info->thr;
|
||||||
|
|
||||||
|
thr->work_restart = false;
|
||||||
|
|
||||||
mutex_lock(&info->qlock);
|
mutex_lock(&info->qlock);
|
||||||
avalon_rotate_array(avalon);
|
/* Will overwrite any work queued */
|
||||||
|
avalon->queued = 0;
|
||||||
pthread_cond_signal(&info->qcond);
|
pthread_cond_signal(&info->qcond);
|
||||||
mutex_unlock(&info->qlock);
|
mutex_unlock(&info->qlock);
|
||||||
|
|
||||||
thr->work_restart = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct api_data *avalon_api_stats(struct cgpu_info *cgpu)
|
static struct api_data *avalon_api_stats(struct cgpu_info *cgpu)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user