Fixed bug 4683 - SDL_atomic infinite recursion on armv6/armv5 w/ thumb

The real problem is that SDL_atomic.c was built in thumb mode instead of ARM mode, which is required to use the mcr instruction on ARM platforms. Added a compiler error to catch this case so we don't generate code that does infinite recursion.

I also added a potentially better way to handle things on Linux ARM platforms, based on comments in the Chromium headers, which we can try out after 2.0.10 ships.
This commit is contained in:
Sam Lantinga committed 2019-06-30 23:26:16 -07:00
1 parent 797d2c5957
commit cc47810d36
2 files changed
+21

No files matched your search

+4
View File
@@ -289,6 +289,10 @@ SDL_AtomicGetPtr(void **a)
#endif
}
#ifdef __thumb__
#error This file should be built in arm mode so the mcr instruction is available for memory barriers
#endif
void
SDL_MemoryBarrierReleaseFunction(void)
{