Threads: add spinlock hit for hyperthreading processors on Windows.

Suggested by Percy Ross Tiglao.
This commit is contained in:
Brecht Van Lommel 2018-05-26 22:29:10 +02:00
parent c9db7ceff2
commit ef502854fe
1 changed files with 2 additions and 1 deletions

View File

@ -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