__sync_fetch

Hei Chan structurechart@yahoo.com
Sat Nov 17 06:34:00 GMT 2012



Hi,

I am using GCC 4.1.2, and so no __atomic*().

I am looking at http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Atomic-Builtins.html

I see __sync_fetch_and_*(), but I don't see __sync_fetch().  Is it because the built-in routines support integral scalar or pointer type that is up to 8 bytes in length, and so the read is automatically atomic anyway?

Thanks in advance.


Cheers,
Hei



More information about the Gcc-help mailing list