X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fsearch.cpp;h=043ada63d6fdd22306d5add2709b325fa768902d;hb=dba1bc354a74bf7774c453ac779b3ce462c2b8e2;hp=a3ad7be13147b4cce2fb8e6d9cea2f2cd1c24045;hpb=4b19430103ac75b574a6b269db447d359814b603;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index a3ad7be1..043ada63 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1643,11 +1643,15 @@ void RootMove::insert_pv_in_tt(Position& pos) { } -/// Thread::idle_loop() is where the thread is parked when it has no work to do. -/// The parameter 'master_sp', if non-NULL, is a pointer to an active SplitPoint -/// object for which the thread is the master. +/// Thread::idle_loop() is where the thread is parked when it has no work to do -void Thread::idle_loop(SplitPoint* sp_master) { +void Thread::idle_loop() { + + // Pointer 'sp_master', if non-NULL, points to the active SplitPoint + // object for which the thread is the master. + const SplitPoint* sp_master = splitPointsCnt ? curSplitPoint : NULL; + + assert(!sp_master || (sp_master->master == this && is_searching)); // If this thread is the master of a split point and all slaves have // finished their work at this split point, return from the idle loop.