1
0
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:
Con Kolivas 2013-05-26 16:46:43 +10:00
parent 3c39d75fc9
commit 0a9d7ca6b3

View File

@ -967,6 +967,19 @@ static int64_t avalon_scanhash(struct thr_info *thr)
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)
{
struct api_data *root = NULL;
@ -1013,6 +1026,7 @@ struct device_drv avalon_drv = {
.hash_work = hash_queued_work,
.queue_full = avalon_fill,
.scanwork = avalon_scanhash,
.flush_work = avalon_flush_work,
.get_api_stats = avalon_api_stats,
.reinit_device = avalon_init,
.thread_shutdown = avalon_shutdown,