[Bf-blender-cvs] [0edf2fc1289] master: BLI: Correct spin lock definition

Sergey Sharybin noreply at git.blender.org
Tue Jul 7 16:51:55 CEST 2020


Commit: 0edf2fc1289dd4b85eda3697355912de35cbbc49
Author: Sergey Sharybin
Date:   Tue Jul 7 16:51:03 2020 +0200
Branches: master
https://developer.blender.org/rB0edf2fc1289dd4b85eda3697355912de35cbbc49

BLI: Correct spin lock definition

The MSVC atomic function is defined for an unsigned type.

Not sure why this became an issue after switch to TBB by default,
maybe some CFLAGS changed to be more strict after that.

===================================================================

M	source/blender/blenlib/BLI_threads.h

===================================================================

diff --git a/source/blender/blenlib/BLI_threads.h b/source/blender/blenlib/BLI_threads.h
index 6f810144a48..920a0a8f650 100644
--- a/source/blender/blenlib/BLI_threads.h
+++ b/source/blender/blenlib/BLI_threads.h
@@ -107,7 +107,7 @@ typedef uint32_t SpinLock;
 #elif defined(__APPLE__)
 typedef ThreadMutex SpinLock;
 #elif defined(_MSC_VER)
-typedef volatile int SpinLock;
+typedef volatile unsigned int SpinLock;
 #else
 typedef pthread_spinlock_t SpinLock;
 #endif



More information about the Bf-blender-cvs mailing list