mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Reformat and simplify previous patch
No functional change.
This commit is contained in:
@@ -112,9 +112,9 @@ bool Thread::cutoff_occurred() const {
|
||||
// which are busy searching the split point at the top of slave's split point
|
||||
// stack (the "helpful master concept" in YBWC terminology).
|
||||
|
||||
bool Thread::available_to(const Thread* master, bool latejoin) const {
|
||||
bool Thread::available_to(const Thread* master) const {
|
||||
|
||||
if (searching && !latejoin)
|
||||
if (searching)
|
||||
return false;
|
||||
|
||||
// Make a local copy to be sure it doesn't become zero under our feet while
|
||||
@@ -239,7 +239,7 @@ void ThreadPool::read_uci_options() {
|
||||
Thread* ThreadPool::available_slave(const Thread* master) const {
|
||||
|
||||
for (const_iterator it = begin(); it != end(); ++it)
|
||||
if ((*it)->available_to(master, false))
|
||||
if ((*it)->available_to(master))
|
||||
return *it;
|
||||
|
||||
return NULL;
|
||||
@@ -292,7 +292,7 @@ void Thread::split(Position& pos, const Stack* ss, Value alpha, Value beta, Valu
|
||||
Threads.mutex.lock();
|
||||
sp.mutex.lock();
|
||||
|
||||
sp.allowLatejoin = true; // Only set this under lock protection
|
||||
sp.allSlavesSearching = true; // Must be set under lock protection
|
||||
++splitPointsSize;
|
||||
activeSplitPoint = &sp;
|
||||
activePosition = NULL;
|
||||
|
||||
Reference in New Issue
Block a user