mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Make the debug counters thread safe.
needed to use them in a threaded run. No functional change.
This commit is contained in:
parent
7cb8817ef2
commit
4c986b0501
1 changed files with 1 additions and 1 deletions
|
@ -145,7 +145,7 @@ const string engine_info(bool to_uci) {
|
|||
|
||||
|
||||
/// Debug functions used mainly to collect run-time statistics
|
||||
static int64_t hits[2], means[2];
|
||||
static std::atomic<int64_t> hits[2], means[2];
|
||||
|
||||
void dbg_hit_on(bool b) { ++hits[0]; if (b) ++hits[1]; }
|
||||
void dbg_hit_on(bool c, bool b) { if (c) dbg_hit_on(b); }
|
||||
|
|
Loading…
Add table
Reference in a new issue