|
|||||||||||
Technical Support On-Line Manuals Compiler User Guide ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
GNU built-in functions
9.154 GNU built-in functionsThese functions provide compatibility with GNU library header files. The functions are described in the GNU documentation. See GCC, the GNU Compiler Collection for more information.
Nonstandard functions
C99 functions
C99 functions in the C90 reserved namespace
C94 functions
C90 functions
The
__builtin_va_list type is also supported. It is equivalent to the
va_list type declared in stdarg.h.C99 floating-point functions
GNU atomic memory access functions
NoteSome architectures, such as ARMv6-M, do not provide the exclusive load
and store instructions required by these intrinsics. Because different users will have
different requirements for how these operations should be performed, the GNU atomic
intrinsics are defined for these targets but require you to implement the
__user_cmpxchg_1 , __user_cmpxchg_2 and __user_cmpxchg_4
functions.These functions are defined as follows:
//Compare and exchange word int __user_cmpxchg_4(unsigned int *ptr, unsigned int old, unsigned int new) //Compare and exchange half word short __user_cmpxchg_2(unsigned short *ptr, unsigned short old, unsigned short new) //Compare and exchange byte char __user_cmpxchg_1(unsigned char *ptr, unsigned char old, unsigned char new) The following is a sample implementation of the
__user_cmpxchg_4() function. Note that in a real implementation, both accesses
to *ptr should be atomic, so that no intervening access
can change the value stored in memory.int __user_cmpxchg_4(unsigned int *ptr, unsigned int old, unsigned int new) { if (*ptr == old) { *ptr = new; return 0; } else { return 1; } } Other built-in functions
| ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.