diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-05-26 23:29:10 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-05-26 23:35:30 +0300 |
commit | ef502854feb6b81119954206bff414d4507f4f3c (patch) | |
tree | 4356c2ce31521598e45a4bfbbe0f23f557771f11 | |
parent | c9db7ceff2546e0fc2967bafa279cf352d30c510 (diff) |
Threads: add spinlock hit for hyperthreading processors on Windows.
Suggested by Percy Ross Tiglao.
-rw-r--r-- | source/blender/blenlib/intern/threads.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/threads.c b/source/blender/blenlib/intern/threads.c index 761f3982e28..e6f5d9839ea 100644 --- a/source/blender/blenlib/intern/threads.c +++ b/source/blender/blenlib/intern/threads.c @@ -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 |