ARM: Add a fallback atomic_add() for bootloader
When ATOMIC_FUNCS_ARE_SYSCALLS atomic.S doesn't export it, but it's used by packagefs.
This commit is contained in:
parent
39d26e3cdb
commit
8fa75a8cca
@ -11,6 +11,7 @@
|
||||
|
||||
#include <OS.h>
|
||||
#include <lock.h>
|
||||
#include <arch_config.h>
|
||||
|
||||
|
||||
extern "C" bool
|
||||
@ -45,3 +46,16 @@ _mutex_unlock(mutex*, bool)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#ifdef ATOMIC_FUNCS_ARE_SYSCALLS
|
||||
|
||||
/* needed by packagefs */
|
||||
extern "C" int32
|
||||
atomic_add(vint32 *value, int32 addValue)
|
||||
{
|
||||
int32 old = *value;
|
||||
*value += addValue;
|
||||
return old;
|
||||
}
|
||||
|
||||
#endif /*ATOMIC_FUNCS_ARE_SYSCALLS*/
|
||||
|
Loading…
Reference in New Issue
Block a user