开发者

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().

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜