6.51. Legacy __sync Built-in Functions for Atomic Memory Access
6.51 Legacy __sync Built-in Functions for Atomic Memory Access
The following built-in functions are intended to be compatible with those described in the Intel Itanium Processor-specific Application Binary Interface, section 7.4. As such, they depart from normal GCC practice by not using the ‘__builtin_
’ prefix and also by being overloaded so that they work on multiple types.
The definition given in the Intel documentation allows only for the use of the types int
, long
, long long
or their unsigned counterparts. GCC allows any scalar type that is 1, 2, 4 or 8 bytes in size other than the C type _Bool
or the C++ type bool
. Operations on pointer arguments are performed as if the operands were of the uintptr_t
type. That is, they are not scaled by the size of the type to which the pointer points.
These functions are implement