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:
@@ -81,11 +81,7 @@ FUNCTION(atomic_get):
|
|||||||
bx lr
|
bx lr
|
||||||
FUNCTION_END(atomic_get)
|
FUNCTION_END(atomic_get)
|
||||||
|
|
||||||
FUNCTION(__sync_fetch_and_add_4):
|
#endif /* ATOMIC_FUNCS_ARE_SYSCALLS */
|
||||||
bx lr
|
|
||||||
FUNCTION_END(__sync_fetch_and_add_4)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef ATOMIC64_FUNCS_ARE_SYSCALLS
|
#ifndef ATOMIC64_FUNCS_ARE_SYSCALLS
|
||||||
|
|
||||||
|
|||||||
@@ -88,3 +88,10 @@ atomic_get64(vint64 *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif /* ATOMIC64_FUNCS_ARE_SYSCALLS */
|
#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);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user