mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Increment total work counter under mutex lock.
This commit is contained in:
parent
e8daf1d8f2
commit
b3cfe47222
@ -2043,7 +2043,9 @@ static struct work *make_work(void)
|
|||||||
|
|
||||||
if (unlikely(!work))
|
if (unlikely(!work))
|
||||||
quit(1, "Failed to calloc work in make_work");
|
quit(1, "Failed to calloc work in make_work");
|
||||||
|
mutex_lock(&control_lock);
|
||||||
work->id = total_work++;
|
work->id = total_work++;
|
||||||
|
mutex_unlock(&control_lock);
|
||||||
return work;
|
return work;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user