This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
__sync_fetch
- From: Hei Chan <structurechart at yahoo dot com>
- To: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Fri, 16 Nov 2012 22:34:16 -0800 (PST)
- Subject: __sync_fetch
- Reply-to: Hei Chan <structurechart at yahoo dot com>
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