]> git.sesse.net Git - stockfish/commitdiff
Fix some races in SMP code
authorMarco Costalba <mcostalba@gmail.com>
Sun, 24 Jan 2010 12:46:27 +0000 (13:46 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 24 Jan 2010 13:30:09 +0000 (14:30 +0100)
When a search fails high then sp->alpha is increased and
slave threads are requested to stop.

So we have to check for a stop request before to start a search
otherwise we could end up with sp->alpha >= sp->beta
leading to an assert in debug run in search_pv().

This patch fixes the assert and get rid of some of possible races.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>

No differences found