Fixed memory barrier macro check so it isn't quite so fragile
authorSam Lantinga <slouken@libsdl.org>
Sun, 30 Jun 2019 23:58:31 -0700
changeset 12916119d21c68b62
parent 12915 e8773976e7c6
child 12917 7b0d6ddaec9d
Fixed memory barrier macro check so it isn't quite so fragile
include/SDL_atomic.h
src/atomic/SDL_atomic.c
     1.1 --- a/include/SDL_atomic.h	Sun Jun 30 23:55:28 2019 -0700
     1.2 +++ b/include/SDL_atomic.h	Sun Jun 30 23:58:31 2019 -0700
     1.3 @@ -184,6 +184,7 @@
     1.4  #elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)
     1.5  #ifdef __thumb__
     1.6  /* The mcr instruction isn't available in thumb mode, use real functions */
     1.7 +#define SDL_MEMORY_BARRIER_USES_FUNCTION
     1.8  #define SDL_MemoryBarrierRelease()   SDL_MemoryBarrierReleaseFunction()
     1.9  #define SDL_MemoryBarrierAcquire()   SDL_MemoryBarrierAcquireFunction()
    1.10  #else
     2.1 --- a/src/atomic/SDL_atomic.c	Sun Jun 30 23:55:28 2019 -0700
     2.2 +++ b/src/atomic/SDL_atomic.c	Sun Jun 30 23:58:31 2019 -0700
     2.3 @@ -289,7 +289,7 @@
     2.4  #endif
     2.5  }
     2.6  
     2.7 -#if defined(__thumb__) && (defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__))
     2.8 +#ifdef SDL_MEMORY_BARRIER_USES_FUNCTION
     2.9  #error This file should be built in arm mode so the mcr instruction is available for memory barriers
    2.10  #endif
    2.11