Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-01-27 16:16:02 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-01-27 16:16:02 +0300
commitefefae62de5a92a6d44b0bc759767bcdd503f199 (patch)
tree8ebad0adc23731181587cf314ec48fd7b744567e /intern/atomic
parent30cbaac9d3d55ba1ee41e14362b39c3a4e5de1de (diff)
Atomics: Use _InterlockedAnd8 direction for 342bit MSVC
That's what MSDN tells you to do and that's how to solve the compilation error problem with it.
Diffstat (limited to 'intern/atomic')
-rw-r--r--intern/atomic/atomic_ops.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/atomic/atomic_ops.h b/intern/atomic/atomic_ops.h
index c7bb0509fdf..dc06a51f859 100644
--- a/intern/atomic/atomic_ops.h
+++ b/intern/atomic/atomic_ops.h
@@ -393,7 +393,11 @@ atomic_fetch_and_and_uint8(uint8_t *p, uint8_t b)
ATOMIC_INLINE uint8_t
atomic_fetch_and_and_uint8(uint8_t *p, uint8_t b)
{
+#if (LG_SIZEOF_PTR == 3 || LG_SIZEOF_INT == 3)
return InterlockedAnd8((char *)p, (char)b);
+#else
+ return _InterlockedAnd8((char *)p, (char)b);
+#endif
}
#else
# error "Missing implementation for 8-bit atomic operations"