ARM: Add a C version of __sync_fetch_and_add_4()

It just calls atomic_add().

No need for the asm version, it doesn't need to depend on defines.
This commit is contained in:
François Revol 2013-09-29 19:41:12 +02:00
parent 48ea3fca49
commit 75453edc01
2 changed files with 8 additions and 5 deletions

View File

@ -81,11 +81,7 @@ FUNCTION(atomic_get):
bx lr
FUNCTION_END(atomic_get)
FUNCTION(__sync_fetch_and_add_4):
bx lr
FUNCTION_END(__sync_fetch_and_add_4)
#endif
#endif /* ATOMIC_FUNCS_ARE_SYSCALLS */
#ifndef ATOMIC64_FUNCS_ARE_SYSCALLS

View File

@ -88,3 +88,10 @@ atomic_get64(vint64 *value)
}
#endif /* ATOMIC64_FUNCS_ARE_SYSCALLS */
/* GCC compatibility: libstdc++ needs this one */
extern int32_t __sync_fetch_and_add_4(int32_t *value, int32_t addValue)
{
return atomic_add((vint32 *)value, addValue);
}