Is there an atomic_add() function on android
i need atomic addition on 开发者_运维技巧android, but i can't find it . In asm/atomic.h file, it just have only ATOMIC_INIT(i) macro definition .
If you write code in C/C++ then you can use the GNU compiler builtins for atomic ops
I am not sure if you mean that you need this in native code, but if you don't, then I'd point out AtomicInteger
from Java / Android libraries provides addAndGet().
精彩评论