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.
This commit is contained in:
Sergey Sharybin 2016-01-27 14:16:02 +01:00
parent 30cbaac9d3
commit efefae62de
1 changed files with 4 additions and 0 deletions

View File

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