mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-02 17:22:33 +00:00
fix bug in thread_reportin (watchdog can detect getwork is false before thr->last is set), and a few cosmetic changes
This commit is contained in:
parent
b8a1c1f660
commit
e58cd00db7
@ -5187,8 +5187,8 @@ static void *api_thread(void *userdata)
|
|||||||
* only across get_work. */
|
* only across get_work. */
|
||||||
static void thread_reportin(struct thr_info *thr)
|
static void thread_reportin(struct thr_info *thr)
|
||||||
{
|
{
|
||||||
thr->getwork = false;
|
|
||||||
cgtime(&thr->last);
|
cgtime(&thr->last);
|
||||||
|
thr->getwork = false;
|
||||||
thr->cgpu->status = LIFE_WELL;
|
thr->cgpu->status = LIFE_WELL;
|
||||||
thr->cgpu->device_last_well = time(NULL);
|
thr->cgpu->device_last_well = time(NULL);
|
||||||
}
|
}
|
||||||
@ -5197,8 +5197,8 @@ static void thread_reportin(struct thr_info *thr)
|
|||||||
* be restarted */
|
* be restarted */
|
||||||
static void thread_reportout(struct thr_info *thr)
|
static void thread_reportout(struct thr_info *thr)
|
||||||
{
|
{
|
||||||
thr->getwork = true;
|
|
||||||
cgtime(&thr->last);
|
cgtime(&thr->last);
|
||||||
|
thr->getwork = true;
|
||||||
thr->cgpu->status = LIFE_WELL;
|
thr->cgpu->status = LIFE_WELL;
|
||||||
thr->cgpu->device_last_well = time(NULL);
|
thr->cgpu->device_last_well = time(NULL);
|
||||||
}
|
}
|
||||||
@ -5220,7 +5220,7 @@ static void hashmeter(int thr_id, struct timeval *diff,
|
|||||||
/* Update the last time this thread reported in */
|
/* Update the last time this thread reported in */
|
||||||
if (thr_id >= 0) {
|
if (thr_id >= 0) {
|
||||||
thr = get_thread(thr_id);
|
thr = get_thread(thr_id);
|
||||||
cgtime(&(thr->last));
|
cgtime(&thr->last);
|
||||||
thr->cgpu->device_last_well = time(NULL);
|
thr->cgpu->device_last_well = time(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user