mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 09:37:16 +08:00
Introduce yielding spin locks
Idea and original implementation by Stephane Nicolet 7 threads 15+0.05 ELO: 3.54 +-2.9 (95%) LOS: 99.2% Total: 17971 W: 2976 L: 2793 D: 12202 There is no functional change in single thread mode
This commit is contained in:
@@ -1696,7 +1696,7 @@ void Thread::idle_loop() {
|
||||
if ( sp->allSlavesSearching
|
||||
&& sp->slavesMask.count() < MAX_SLAVES_PER_SPLITPOINT)
|
||||
{
|
||||
mutex.lock();
|
||||
allocMutex.lock();
|
||||
|
||||
if (can_join(sp))
|
||||
{
|
||||
@@ -1705,7 +1705,7 @@ void Thread::idle_loop() {
|
||||
searching = true;
|
||||
}
|
||||
|
||||
mutex.unlock();
|
||||
allocMutex.unlock();
|
||||
}
|
||||
|
||||
sp->mutex.unlock();
|
||||
|
||||
Reference in New Issue
Block a user