src/atomic/SDL_atomic.c
changeset 10879 773cbb61ad27
parent 10737 3406a0f8b041
child 10946 623e8891e091
equal deleted inserted replaced
10878:7fa08228d9e3 10879:773cbb61ad27
   226         value = *a;
   226         value = *a;
   227     } while (!SDL_AtomicCASPtr(a, value, value));
   227     } while (!SDL_AtomicCASPtr(a, value, value));
   228     return value;
   228     return value;
   229 }
   229 }
   230 
   230 
   231 #ifdef __thumb__
   231 void
   232 #if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)
   232 SDL_MemoryBarrierReleaseFunction(void)
   233 __asm__(
   233 {
   234 "   .align 2\n"
   234     SDL_MemoryBarrierRelease();
   235 "   .globl _SDL_MemoryBarrierRelease\n"
   235 }
   236 "   .globl _SDL_MemoryBarrierAcquire\n"
   236 
   237 "_SDL_MemoryBarrierRelease:\n"
   237 void
   238 "_SDL_MemoryBarrierAcquire:\n"
   238 SDL_MemoryBarrierAcquireFunction(void)
   239 "   mov r0, #0\n"
   239 {
   240 "   mcr p15, 0, r0, c7, c10, 5\n"
   240     SDL_MemoryBarrierAcquire();
   241 "   bx lr\n"
   241 }
   242 );
       
   243 #endif
       
   244 #endif
       
   245 
   242 
   246 /* vi: set ts=4 sw=4 expandtab: */
   243 /* vi: set ts=4 sw=4 expandtab: */