mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-14 15:11:56 +00:00
Really correct the staged count logic failure.
This commit is contained in:
parent
82cac38874
commit
fbcd2942c8
7
main.c
7
main.c
@ -762,8 +762,11 @@ static bool workio_submit_work(struct workio_cmd *wc)
|
|||||||
static void inc_staged(int inc, bool lp)
|
static void inc_staged(int inc, bool lp)
|
||||||
{
|
{
|
||||||
pthread_mutex_lock(&stgd_lock);
|
pthread_mutex_lock(&stgd_lock);
|
||||||
if (lp)
|
if (lp) {
|
||||||
lp_staged += inc;
|
lp_staged += inc;
|
||||||
|
total_staged += inc;
|
||||||
|
} else if (lp_staged)
|
||||||
|
lp_staged--;
|
||||||
else
|
else
|
||||||
total_staged += inc;
|
total_staged += inc;
|
||||||
pthread_mutex_unlock(&stgd_lock);
|
pthread_mutex_unlock(&stgd_lock);
|
||||||
@ -783,7 +786,7 @@ static int requests_staged(void)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
pthread_mutex_lock(&stgd_lock);
|
pthread_mutex_lock(&stgd_lock);
|
||||||
ret = total_staged + lp_staged;
|
ret = total_staged;
|
||||||
pthread_mutex_unlock(&stgd_lock);
|
pthread_mutex_unlock(&stgd_lock);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user