From 414ba224ca707f3c49767748ba8ce9de5cf2935a Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Sun, 20 Sep 2015 14:54:18 -0400 Subject: [PATCH] ck_cc: Add FORCE_INLINE attribute and remove stale comments. --- include/ck_cc.h | 8 ++++++++ include/gcc/ck_cc.h | 4 +--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/ck_cc.h b/include/ck_cc.h index b588616..e17dc7b 100644 --- a/include/ck_cc.h +++ b/include/ck_cc.h @@ -36,6 +36,14 @@ #define CK_CC_RESTRICT #endif +#ifndef CK_CC_INLINE +#define CK_CC_INLINE inline +#endif + +#ifndef CK_CC_FORCE_INLINE +#define CK_CC_FORCE_INLINE inline +#endif + #define CK_CC_DECONST_PTR(X) ((void *)(uintptr_t)(X)) /* diff --git a/include/gcc/ck_cc.h b/include/gcc/ck_cc.h index 481a314..6806130 100644 --- a/include/gcc/ck_cc.h +++ b/include/gcc/ck_cc.h @@ -48,15 +48,13 @@ #endif /* __x86_64__ || __x86__ */ #endif -/* - * If optimizations are turned on, then force inlining. - */ #ifdef __OPTIMIZE__ #define CK_CC_INLINE CK_CC_UNUSED inline #else #define CK_CC_INLINE CK_CC_UNUSED #endif +#define CK_CC_FORCE_INLINE CK_CC_UNUSED __attribute__((always_inline)) inline #define CK_CC_RESTRICT restrict /*