X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fthread.cpp;h=14c778f8699fb2456fe4e7ec064e7c0db283b5ac;hb=58c9fbacc787cc3b654244c071169057e6895c91;hp=9aa0b55ef0deaafac39f430bbab900a754ba855f;hpb=6950d07bf421b122ccb5a15a2ed4fa3a993d9609;p=stockfish diff --git a/src/thread.cpp b/src/thread.cpp index 9aa0b55e..14c778f8 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -296,7 +296,7 @@ Value ThreadPool::split(Position& pos, Stack* ss, Value alpha, Value beta, for (size_t i = 0; i < threads.size() && !Fake; ++i) if (threads[i]->is_available_to(master) && ++slavesCnt <= maxThreadsPerSplitPoint) { - sp.slavesMask |= 1ULL << i; + sp.slavesMask |= 1ULL << threads[i]->idx; threads[i]->activeSplitPoint = &sp; threads[i]->searching = true; // Slave leaves idle_loop() threads[i]->notify_one(); // Could be sleeping @@ -352,8 +352,8 @@ void ThreadPool::wait_for_think_finished() { } -// start_thinking() wakes up the main thread sleeping in main_loop() so to start -// a new search, then returns immediately. +// start_thinking() wakes up the main thread sleeping in MainThread::idle_loop() +// so to start a new search, then returns immediately. void ThreadPool::start_thinking(const Position& pos, const LimitsType& limits, const std::vector& searchMoves, StateStackPtr& states) {