forked from bartvdbraak/blender
Threads: add spinlock hit for hyperthreading processors on Windows.
Suggested by Percy Ross Tiglao.
This commit is contained in:
parent
c9db7ceff2
commit
ef502854fe
@ -488,7 +488,8 @@ void BLI_spin_lock(SpinLock *spin)
|
||||
#elif defined(_MSC_VER)
|
||||
while (InterlockedExchangeAcquire(spin, 1)) {
|
||||
while (*spin) {
|
||||
/* pass */
|
||||
/* Spinlock hint for processors with hyperthreading. */
|
||||
YieldProcessor();
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user