1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-11 07:17:58 +00:00

Really correct the staged count logic failure.

This commit is contained in:
Con Kolivas 2011-07-10 14:02:23 +10:00
parent 82cac38874
commit fbcd2942c8

7
main.c
View File

@ -762,8 +762,11 @@ static bool workio_submit_work(struct workio_cmd *wc)
static void inc_staged(int inc, bool lp)
{
pthread_mutex_lock(&stgd_lock);
if (lp)
if (lp) {
lp_staged += inc;
total_staged += inc;
} else if (lp_staged)
lp_staged--;
else
total_staged += inc;
pthread_mutex_unlock(&stgd_lock);
@ -783,7 +786,7 @@ static int requests_staged(void)
int ret;
pthread_mutex_lock(&stgd_lock);
ret = total_staged + lp_staged;
ret = total_staged;
pthread_mutex_unlock(&stgd_lock);
return ret;
}