Linux 32 位和 64 位的原子操作函数?

Atomic operation functions for Linux 32bit and 64bit?

在Windows中,原子操作函数被32bit和64bit分开是这样的:

与此同时,Linux 中哪些功能具有相同的功能? __sync_sub_and_fetch做64位变量的函数是什么?

__sync_fetch_and_add(adress,value);
__sync_fetch_and_sub(adress,value);

根据我的经验,这些功能可以在 Linux64_x86

上无缝运行

您可以在下面找到详细信息

https://gcc.gnu.org/onlinedocs/gcc-4.4.3/gcc/Atomic-Builtins.html