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:
parent
2f89eef4b1
commit
5f041e1a72
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user