From adb5dc0090bc419e2c4c1250653badbddeb6263b Mon Sep 17 00:00:00 2001 From: Jani Hakala Date: Thu, 27 Feb 2014 15:23:44 +0200 Subject: Add ETHR_FORCE_INLINE define to hide compiler specific directives Some win32 specific code does not compile with gcc (mingw-w64) since '__forceinline' is not supported by gcc. This can be avoided by defining a new macro ETHR_FORCE_INLINE similar to ETHR_INLINE. --- erts/include/internal/ethread.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'erts/include/internal/ethread.h') diff --git a/erts/include/internal/ethread.h b/erts/include/internal/ethread.h index 64f1fae6d8..6f9bc184ef 100644 --- a/erts/include/internal/ethread.h +++ b/erts/include/internal/ethread.h @@ -54,13 +54,16 @@ #undef ETHR_INLINE #if defined(__GNUC__) # define ETHR_INLINE __inline__ +# define ETHR_FORCE_INLINE __inline__ __attribute__((__always_inline__)) #elif defined(__WIN32__) # define ETHR_INLINE __forceinline +# define ETHR_FORCE_INLINE __forceinline #endif #if defined(ETHR_DEBUG) || !defined(ETHR_INLINE) || ETHR_XCHK \ || (defined(__GNUC__) && defined(ERTS_MIXED_CYGWIN_VC)) # undef ETHR_INLINE # define ETHR_INLINE +# define ETHR_FORCE_INLINE # undef ETHR_TRY_INLINE_FUNCS #endif -- cgit v1.2.3