This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

atomic operations

Note: This was originally posted on 31st August 2010 at http://forums.arm.com

Hi all,

I have to migrate Windows Code to Linux for an ARM processor. The Windows code uses the InterlockedIncrement function of the Windows API. I found a way to create functions for Linux which behave the same way as the Windows functions but it seems that this only works on Intel processors. The function I use is __sync_fetch_and_add (type *ptr, type value, ...). [url="http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Atomic-Builtins.html"]http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gc...c-Builtins.html[/url]
Is there something similar for ARM?

thanks for your answers,
Chris from Austria
0