c++ - Equivalent of InterlockedIncrement in Linux/gcc -


This would be a very simple question (can be repeated), but I was unable to find it.

The Win32 API provides a very easy set of atomic operations (such as intrinsics) such as interlock incinerator which adds lock using x86 code Does. In addition, Interlock Comprehensive Exchange has been mapped to lock cmpxchg .

But, I want to do it in Linux with GCC. Since I am working 64-bit, it is impossible to use inline assembly to have internalities for GCC?


Comments

Popular posts from this blog

objective c - iPhone and it's wireless area -

unix - Listing all shared memory segments used by a process on AIX5.3+ -

.net - Self Tracking Entities (STE)'s and partial updates with EF4 and mVC2 -