]> git.sesse.net Git - stockfish/blobdiff - src/thread.h
Move wait_for_stop_or_ponderhit() under Thread
[stockfish] / src / thread.h
index beb09e4d5df5700a212bb08db0b84e5a7c161a9a..dea9d79720112ed77902696b8b45877d77ffd5c0 100644 (file)
@@ -40,7 +40,6 @@ struct SplitPoint {
   Depth depth;
   Value beta;
   int nodeType;
-  int ply;
   int master;
   Move threatMove;
 
@@ -55,7 +54,7 @@ struct SplitPoint {
   volatile Value alpha;
   volatile Value bestValue;
   volatile int moveCount;
-  volatile bool is_betaCutoff;
+  volatile bool cutoff;
 };
 
 
@@ -72,6 +71,7 @@ struct Thread {
   void idle_loop(SplitPoint* sp_master);
   void main_loop();
   void timer_loop();
+  void wait_for_stop_or_ponderhit();
 
   SplitPoint splitPoints[MAX_ACTIVE_SPLIT_POINTS];
   MaterialInfoTable materialTable;
@@ -111,7 +111,6 @@ public:
   void read_uci_options();
   bool available_slave_exists(int master) const;
   void set_timer(int msec);
-  void wait_for_stop_or_ponderhit();
   void stop_thinking();
   void start_thinking(const Position& pos, const Search::LimitsType& limits,
                       const std::set<Move>& = std::set<Move>(), bool async = false);
@@ -123,12 +122,12 @@ private:
   friend struct Thread;
 
   Thread threads[MAX_THREADS + 1]; // Last one is used as a timer
-  Lock threadsLock;
+  Lock splitLock;
+  WaitCondition sleepCond;
   Depth minimumSplitDepth;
   int maxThreadsPerSplitPoint;
   int activeThreads;
   bool useSleepingThreads;
-  WaitCondition sleepCond;
 };
 
 extern ThreadsManager Threads;