Adding M_HOT_ATTRIBUTE
This commit is contained in:
1 parent
e787b64978
commit
29fe80a6af
1 file changed
+4
-2
@@ -132,11 +132,13 @@
|
|||||||
# define M_ATTR_NO_RETURN
|
# define M_ATTR_NO_RETURN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The cold attribute on functions is used to inform the compiler
|
/* The hot/cold attribute on functions is used to inform the compiler
|
||||||
that the function is unlikely to be executed. */
|
that the function is likely/unlikely to be executed. */
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
|
# define M_ATTR_HOT_FUNCTION __attribute__ ((hot))
|
||||||
# define M_ATTR_COLD_FUNCTION __attribute__ ((cold))
|
# define M_ATTR_COLD_FUNCTION __attribute__ ((cold))
|
||||||
#else
|
#else
|
||||||
|
# define M_ATTR_HOT_FUNCTION
|
||||||
# define M_ATTR_COLD_FUNCTION
|
# define M_ATTR_COLD_FUNCTION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user