From: Marco Costalba Date: Sun, 19 Aug 2012 12:06:26 +0000 (+0100) Subject: Avoid wake up master thread when useless X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=2f4a9a140ae7882365f64ac11cf263bd505418e6 Avoid wake up master thread when useless Check we are the last slave of the split point before to wake up the master. This should avoid spurious wakes up. No functional change. Signed-off-by: Marco Costalba --- diff --git a/src/search.cpp b/src/search.cpp index 043ada63..a29fd0f6 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1728,8 +1728,11 @@ void Thread::idle_loop() { // case we are the last slave of the split point. if ( Threads.use_sleeping_threads() && this != sp->master - && !sp->master->is_searching) + && !sp->slavesMask) + { + assert(!sp->master->is_searching); sp->master->wake_up(); + } // After releasing the lock we cannot access anymore any SplitPoint // related data in a safe way becuase it could have been released under