projects
/
blender.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
30cbaac
)
Atomics: Use _InterlockedAnd8 direction for 342bit MSVC
author
Sergey Sharybin <sergey.vfx@gmail.com>
Wed, 27 Jan 2016 13:16:02 +0000
(14:16 +0100)
committer
Sergey Sharybin <sergey.vfx@gmail.com>
Wed, 27 Jan 2016 13:16:02 +0000
(14:16 +0100)
That's what MSDN tells you to do and that's how to solve the compilation
error problem with it.
intern/atomic/atomic_ops.h
patch
|
blob
|
history
diff --git
a/intern/atomic/atomic_ops.h
b/intern/atomic/atomic_ops.h
index c7bb0509fdf34831f17a601f2c5f379dc0ec72d2..dc06a51f85979ef61b764f2d5fbfa8e8464a8595 100644
(file)
--- 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"