]> git.sesse.net Git - stockfish/blobdiff - src/thread.h
Fix some comments in early stop detection
[stockfish] / src / thread.h
index 64804d45e19f9b882010ff1a0751a53cc3fade31..b476d529f4d3a1455e662958a8190a6094178870 100644 (file)
@@ -68,10 +68,19 @@ enum ThreadState
 };
 
 struct Thread {
+  int maxPly;
+  Lock sleepLock;
+  WaitCondition sleepCond;
   volatile ThreadState state;
   SplitPoint* volatile splitPoint;
   volatile int activeSplitPoints;
   SplitPoint splitPoints[MAX_ACTIVE_SPLIT_POINTS];
+
+  void wake_up() {
+    lock_grab(&sleepLock);
+    cond_signal(&sleepCond);
+    lock_release(&sleepLock);
+  }
 };
 
 #endif // !defined(THREAD_H_INCLUDED)