]> git.sesse.net Git - stockfish/commit
Fix some races
authorJoona Kiiski <joona.kiiski@gmail.com>
Mon, 22 Feb 2010 13:15:55 +0000 (15:15 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 23 Feb 2010 06:22:56 +0000 (07:22 +0100)
commitc67b9916f1756b56895d66efffc88edcc0e15566
tree04e5231de6576ef3b40927b1db1a4bc32c26881a
parent78c6bb1079f600164270edc8b03f80d51b47cf67
Fix some races

Resurrect extra check for sleeping in POSIX code.
This necessary to prevent ugly races between
thread_broadcast and thread_cond_wait.

After thread has woken up, it marks itself as available.
Another thread must not do this, because of possible race.

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