Guard the __sync_* atomic helper with __ARM__

I didn't notice I was adding to a generic file.
This commit is contained in:
François Revol
2013-09-29 22:43:34 +02:00
parent d61f592d9b
commit f9ab70a1d1
+5
View File
@@ -89,12 +89,17 @@ atomic_get64(vint64 *value)
#endif /* ATOMIC64_FUNCS_ARE_SYSCALLS */
#ifdef __ARM__
/* GCC compatibility: libstdc++ needs this one.
* TODO: Update libstdc++ and drop this.
* cf. http://fedoraproject.org/wiki/Architectures/ARM/GCCBuiltInAtomicOperations
*/
extern int32_t __sync_fetch_and_add_4(int32_t *value, int32_t addValue);
extern int32_t __sync_fetch_and_add_4(int32_t *value, int32_t addValue)
{
return atomic_add((vint32 *)value, addValue);
}
#endif