mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
cdefs.h: Define __COLD
This expands to __attribute__ ((cold)) when supported. It should be used to mark up functions that are invoked rarely. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
This commit is contained in:
parent
f56ad6174c
commit
0ab341b247
1 changed files with 7 additions and 0 deletions
|
@ -98,6 +98,12 @@
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
# if __GNUC_PREREQ (4, 3) || __glibc_has_attribute (__cold__)
|
||||||
|
# define __COLD __attribute__ ((__cold__))
|
||||||
|
# else
|
||||||
|
# define __COLD
|
||||||
|
# endif
|
||||||
|
|
||||||
#else /* Not GCC or clang. */
|
#else /* Not GCC or clang. */
|
||||||
|
|
||||||
# if (defined __cplusplus \
|
# if (defined __cplusplus \
|
||||||
|
@ -110,6 +116,7 @@
|
||||||
# define __THROW
|
# define __THROW
|
||||||
# define __THROWNL
|
# define __THROWNL
|
||||||
# define __NTH(fct) fct
|
# define __NTH(fct) fct
|
||||||
|
# define __COLD
|
||||||
|
|
||||||
#endif /* GCC || clang. */
|
#endif /* GCC || clang. */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue