]> git.sesse.net Git - stockfish/blobdiff - src/thread.cpp
Reintroduce gains
[stockfish] / src / thread.cpp
index 782537d765dd6c567c22883b42764e38cb74a479..a6899de9cbff793b9650ac4b30029c72f4ec20b5 100644 (file)
@@ -101,11 +101,11 @@ void TimerThread::idle_loop() {
       mutex.lock();
 
       if (!exit)
-          sleepCondition.wait_for(mutex, msec ? msec : INT_MAX);
+          sleepCondition.wait_for(mutex, run ? Resolution : INT_MAX);
 
       mutex.unlock();
 
-      if (msec)
+      if (run)
           check_time();
   }
 }
@@ -296,7 +296,7 @@ void Thread::split(Position& pos, const Stack* ss, Value alpha, Value beta, Valu
   Threads.mutex.lock();
   sp.mutex.lock();
 
-  splitPointsSize++;
+  ++splitPointsSize;
   activeSplitPoint = &sp;
   activePosition = NULL;
 
@@ -336,7 +336,7 @@ void Thread::split(Position& pos, const Stack* ss, Value alpha, Value beta, Valu
   }
 
   searching = true;
-  splitPointsSize--;
+  --splitPointsSize;
   activeSplitPoint = sp.parentSplitPoint;
   activePosition = &pos;
   pos.set_nodes_searched(pos.nodes_searched() + sp.nodes);