1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-11 07:17:58 +00:00

Don't get any work if our queue is already full in avalon_fill.

This commit is contained in:
Con Kolivas 2013-04-06 12:51:59 +11:00
parent 2f89eef4b1
commit 5f041e1a72

View File

@ -785,13 +785,14 @@ static inline void adjust_fan(struct avalon_info *info)
static bool avalon_fill(struct cgpu_info *avalon)
{
struct work *work = get_queued(avalon);
struct work *work;
int mc = avalon_infos[avalon->device_id]->miner_count;
if (unlikely(!work))
return false;
if (avalon->queued >= mc)
return true;
work = get_queued(avalon);
if (unlikely(!work))
return false;
avalon->works[avalon->work_array * mc + avalon->queued++] = work;
if (avalon->queued >= mc)
return true;