X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fthread.h;h=26aed392fd34bf1977eb7f1edf7366ffbad67787;hp=046980d22a1dcc5753b19117ed864c9b03da38ee;hb=15e21911110f9d459c4fef2bb17903d97345d0b9;hpb=aab5863dd42da0a8e493a2ffaca96319b3d19ebb diff --git a/src/thread.h b/src/thread.h index 046980d2..26aed392 100644 --- a/src/thread.h +++ b/src/thread.h @@ -77,6 +77,7 @@ struct SplitPoint { // Shared data Mutex mutex; std::bitset slavesMask; + volatile bool allSlavesSearching; volatile uint64_t nodes; volatile Value alpha; volatile Value bestValue; @@ -91,7 +92,7 @@ struct SplitPoint { struct ThreadBase { - ThreadBase() : exit(false) {} + ThreadBase() : handle(NativeHandle()), exit(false) {} virtual ~ThreadBase() {} virtual void idle_loop() = 0; void notify_one(); @@ -116,7 +117,6 @@ struct Thread : public ThreadBase { bool cutoff_occurred() const; bool available_to(const Thread* master) const; - template void split(Position& pos, const Search::Stack* ss, Value alpha, Value beta, Value* bestValue, Move* bestMove, Depth depth, int moveCount, MovePicker* movePicker, int nodeType, bool cutNode); @@ -165,7 +165,6 @@ struct ThreadPool : public std::vector { void wait_for_think_finished(); void start_thinking(const Position&, const Search::LimitsType&, Search::StateStackPtr&); - bool sleepWhileIdle; Depth minimumSplitDepth; Mutex mutex; ConditionVariable sleepCondition;