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

Store the subid for the work item in avalon.

This commit is contained in:
Con Kolivas 2013-04-07 11:59:14 +10:00
parent d9ba82c607
commit 8e69d75f36

View File

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