]> git.sesse.net Git - stockfish/commit
Simplify idle_loop() signature
authorMarco Costalba <mcostalba@gmail.com>
Sun, 19 Aug 2012 10:20:33 +0000 (11:20 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 19 Aug 2012 22:01:28 +0000 (23:01 +0100)
commitdba1bc354a74bf7774c453ac779b3ce462c2b8e2
tree21de6a23fd05af5b2ba9b19eb60e3abc8cf3bbe9
parent4b19430103ac75b574a6b269db447d359814b603
Simplify idle_loop() signature

We can detect the split point master also from within idle_loop,
so we can call the function without parameters and remove an
overloaded member hack in Thread class.

Note that we don't need to take a lock around curSplitPoint
when entering idle_loop() because if we are the master then
curSplitPoint cannot change under our feet (because is_searching
is set and so we cannot be reallocated), if we are a slave
we enter idle_loop() only upon Thread creation and in that case
is always splitPointsCnt == 0. This is true even in the very rare
case that curSplitPoint != NULL, if we have been already allocated
even before entering idle_loop().

No functional change.

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