mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-02 10:04:33 +00:00
Use cloned work when finding avalon results since another thread can discard the work item while it's in use.
This commit is contained in:
parent
98e338cc52
commit
3fe8948629
@ -754,8 +754,8 @@ static void avalon_init(struct cgpu_info *avalon)
|
|||||||
|
|
||||||
static struct work *avalon_valid_result(struct cgpu_info *avalon, struct avalon_result *ar)
|
static struct work *avalon_valid_result(struct cgpu_info *avalon, struct avalon_result *ar)
|
||||||
{
|
{
|
||||||
return find_queued_work_bymidstate(avalon, (char *)ar->midstate, 32,
|
return clone_queued_work_bymidstate(avalon, (char *)ar->midstate, 32,
|
||||||
(char *)ar->data, 64, 12);
|
(char *)ar->data, 64, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void avalon_update_temps(struct cgpu_info *avalon, struct avalon_info *info,
|
static void avalon_update_temps(struct cgpu_info *avalon, struct avalon_info *info,
|
||||||
@ -798,6 +798,7 @@ static void avalon_parse_results(struct cgpu_info *avalon, struct avalon_info *i
|
|||||||
info->auto_hw++;
|
info->auto_hw++;
|
||||||
mutex_unlock(&info->lock);
|
mutex_unlock(&info->lock);
|
||||||
}
|
}
|
||||||
|
free_work(work);
|
||||||
|
|
||||||
if (gettemp)
|
if (gettemp)
|
||||||
avalon_update_temps(avalon, info, ar);
|
avalon_update_temps(avalon, info, ar);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user