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
Post a Comment