diff --git a/src/system/boot/arch/arm/kernel_stubs.cpp b/src/system/boot/arch/arm/kernel_stubs.cpp index 6d1d60c2f8..79de7b9a9a 100644 --- a/src/system/boot/arch/arm/kernel_stubs.cpp +++ b/src/system/boot/arch/arm/kernel_stubs.cpp @@ -11,6 +11,7 @@ #include #include +#include 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*/