]> git.sesse.net Git - stockfish/commit
Ensure function boundaries for threads state changes
authorMarco Costalba <mcostalba@gmail.com>
Sat, 13 Feb 2010 11:39:27 +0000 (12:39 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 13 Feb 2010 11:40:29 +0000 (12:40 +0100)
commit78e494fcbc54565943b62f8108cc0396a79c491e
treec7dc4ba07fe0b96bbad9ae9789b51ca8c81e2704
parenta16415f44dde03fe1eee8e67d999196dd1838573
Ensure function boundaries for threads state changes

Ensure threads are sleeping when leaving init_threads() and
the newly introduced put_threads_to_sleep().

Also ensure threads are not sleeping when leaving
wake_sleeping_threads().

As a side effect we now leave think() with all the threads
(but the main one) guaranteed to sleep. So when we enter
again in think(), after the opponent next move, we know
threads must be sleeping.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp