X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=7ba64c44337dbe3de43276342f89670d03ed64ba;hp=f259c8fb5938822d9fe1093de1842a7cb7274e16;hb=c5e71f515045029f4d89f1302277217b878fa7a4;hpb=c5858ff9aef05c4b6f8423d9a9060296bb826fde diff --git a/src/search.cpp b/src/search.cpp index f259c8fb..7ba64c44 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -3010,13 +3010,14 @@ namespace { // their idle loop. Also copy search stack tail for each slave thread. for (int i = 0; i < ActiveThreads; i++) { + if (splitPoint->slaves[i]) + memcpy(splitPoint->sstack[i] + ply - 1, sstck + ply - 1, 3 * sizeof(SearchStack)); + if (i == master || splitPoint->slaves[i]) { - Threads[i].workIsWaiting = true; Threads[i].stop = false; + Threads[i].workIsWaiting = true; // This makes the slave to exit from idle_loop() } - if (splitPoint->slaves[i]) - memcpy(splitPoint->sstack[i] + ply - 1, sstck + ply - 1, 3 * sizeof(SearchStack)); } // Everything is set up. The master thread enters the idle loop, from