diff options
author | Jason Evans <je@fb.com> | 2013-12-10 22:23:10 (GMT) |
---|---|---|
committer | Jason Evans <je@fb.com> | 2013-12-10 22:35:34 (GMT) |
commit | 6edc97db15311fdac189798ec24e3eb39dc75d8e (patch) | |
tree | 95c147eb16a37b37730cc713c4ced7a41ddb4755 /include | |
parent | 736923254409aed1a4a226e0ba7429f573c1f372 (diff) | |
download | jemalloc-6edc97db15311fdac189798ec24e3eb39dc75d8e.zip jemalloc-6edc97db15311fdac189798ec24e3eb39dc75d8e.tar.gz jemalloc-6edc97db15311fdac189798ec24e3eb39dc75d8e.tar.bz2 |
Fix inline-related macro issues.
Add JEMALLOC_INLINE_C and use it instead of JEMALLOC_INLINE in .c files,
so that the annotated functions are always static.
Remove SFMT's inline-related macros and use jemalloc's instead, so that
there's no danger of interactions with jemalloc's definitions that
disable inlining for debug builds.
Diffstat (limited to 'include')
-rw-r--r-- | include/jemalloc/internal/jemalloc_internal_macros.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/include/jemalloc/internal/jemalloc_internal_macros.h b/include/jemalloc/internal/jemalloc_internal_macros.h index 82f827d..70602ee 100644 --- a/include/jemalloc/internal/jemalloc_internal_macros.h +++ b/include/jemalloc/internal/jemalloc_internal_macros.h @@ -1,16 +1,18 @@ /* - * JEMALLOC_ALWAYS_INLINE is used within header files for functions that are - * static inline functions if inlining is enabled, and single-definition - * library-private functions if inlining is disabled. + * JEMALLOC_ALWAYS_INLINE and JEMALLOC_INLINE are used within header files for + * functions that are static inline functions if inlining is enabled, and + * single-definition library-private functions if inlining is disabled. * - * JEMALLOC_ALWAYS_INLINE_C is for use in .c files, in which case the denoted - * functions are always static, regardless of whether inlining is enabled. + * JEMALLOC_ALWAYS_INLINE_C and JEMALLOC_INLINE_C are for use in .c files, in + * which case the denoted functions are always static, regardless of whether + * inlining is enabled. */ #if defined(JEMALLOC_DEBUG) || defined(JEMALLOC_CODE_COVERAGE) /* Disable inlining to make debugging/profiling easier. */ # define JEMALLOC_ALWAYS_INLINE # define JEMALLOC_ALWAYS_INLINE_C static # define JEMALLOC_INLINE +# define JEMALLOC_INLINE_C static # define inline #else # define JEMALLOC_ENABLE_INLINE @@ -24,15 +26,16 @@ # define JEMALLOC_ALWAYS_INLINE_C static inline # endif # define JEMALLOC_INLINE static inline +# define JEMALLOC_INLINE_C static inline # ifdef _MSC_VER # define inline _inline # endif #endif #ifdef JEMALLOC_CC_SILENCE -#define UNUSED JEMALLOC_ATTR(unused) +# define UNUSED JEMALLOC_ATTR(unused) #else -#define UNUSED +# define UNUSED #endif #define ZU(z) ((size_t)z) @@ -42,4 +45,3 @@ #ifndef __DECONST # define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var)) #endif - |