aboutsummaryrefslogtreecommitdiffstats
path: root/erts/include/internal/win/ethr_membar.h
diff options
context:
space:
mode:
authorJani Hakala <[email protected]>2014-02-27 15:23:44 +0200
committerJani Hakala <[email protected]>2014-02-28 11:05:13 +0200
commitadb5dc0090bc419e2c4c1250653badbddeb6263b (patch)
treed7f304279daafc26ec5ed3093614afe1b8851b33 /erts/include/internal/win/ethr_membar.h
parenta74e66a68f3b4ed590f928b4fd4f0808c6287a32 (diff)
downloadotp-adb5dc0090bc419e2c4c1250653badbddeb6263b.tar.gz
otp-adb5dc0090bc419e2c4c1250653badbddeb6263b.tar.bz2
otp-adb5dc0090bc419e2c4c1250653badbddeb6263b.zip
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.
Diffstat (limited to 'erts/include/internal/win/ethr_membar.h')
-rw-r--r--erts/include/internal/win/ethr_membar.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/erts/include/internal/win/ethr_membar.h b/erts/include/internal/win/ethr_membar.h
index 8237660b2c..a17f2459fc 100644
--- a/erts/include/internal/win/ethr_membar.h
+++ b/erts/include/internal/win/ethr_membar.h
@@ -63,13 +63,13 @@ do { \
#pragma intrinsic(_mm_sfence)
#pragma intrinsic(_mm_lfence)
-static __forceinline void
+static ETHR_FORCE_INLINE void
ethr_cfence__(void)
{
_ReadWriteBarrier();
}
-static __forceinline void
+static ETHR_FORCE_INLINE void
ethr_mfence__(void)
{
#if ETHR_SIZEOF_PTR == 4
@@ -80,7 +80,7 @@ ethr_mfence__(void)
_mm_mfence();
}
-static __forceinline void
+static ETHR_FORCE_INLINE void
ethr_sfence__(void)
{
#if ETHR_SIZEOF_PTR == 4
@@ -91,7 +91,7 @@ ethr_sfence__(void)
_mm_sfence();
}
-static __forceinline void
+static ETHR_FORCE_INLINE void
ethr_lfence__(void)
{
#if ETHR_SIZEOF_PTR == 4