mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 20:44:19 +00:00
Implement an avalon_flush_work function for work restarts.
This commit is contained in:
parent
3c39d75fc9
commit
0a9d7ca6b3
@ -967,6 +967,19 @@ static int64_t avalon_scanhash(struct thr_info *thr)
|
|||||||
return hash_count;
|
return hash_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void avalon_flush_work(struct cgpu_info *avalon)
|
||||||
|
{
|
||||||
|
struct avalon_info *info = avalon->device_data;
|
||||||
|
struct thr_info *thr = info->thr;
|
||||||
|
|
||||||
|
mutex_lock(&info->qlock);
|
||||||
|
avalon_rotate_array(avalon);
|
||||||
|
pthread_cond_signal(&info->qcond);
|
||||||
|
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)
|
||||||
{
|
{
|
||||||
struct api_data *root = NULL;
|
struct api_data *root = NULL;
|
||||||
@ -1013,6 +1026,7 @@ struct device_drv avalon_drv = {
|
|||||||
.hash_work = hash_queued_work,
|
.hash_work = hash_queued_work,
|
||||||
.queue_full = avalon_fill,
|
.queue_full = avalon_fill,
|
||||||
.scanwork = avalon_scanhash,
|
.scanwork = avalon_scanhash,
|
||||||
|
.flush_work = avalon_flush_work,
|
||||||
.get_api_stats = avalon_api_stats,
|
.get_api_stats = avalon_api_stats,
|
||||||
.reinit_device = avalon_init,
|
.reinit_device = avalon_init,
|
||||||
.thread_shutdown = avalon_shutdown,
|
.thread_shutdown = avalon_shutdown,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user