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:
parent
48ea3fca49
commit
75453edc01
@ -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
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user