aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-02-12 18:28:35 +0100
committerSverker Eriksson <[email protected]>2013-02-12 18:28:35 +0100
commitdc0223f9425ff2390686833557ff333f1f3d7414 (patch)
treec731abd65ea12d31f23b6e6b9902071d42232503
parentcd08400f92ec7672025bf39a458effcf33a423dc (diff)
downloadotp-dc0223f9425ff2390686833557ff333f1f3d7414.tar.gz
otp-dc0223f9425ff2390686833557ff333f1f3d7414.tar.bz2
otp-dc0223f9425ff2390686833557ff333f1f3d7414.zip
erts: Use native atomics and fallback spinlock to mutex for VALGRIND
An attempt to speedup valgrind
-rw-r--r--erts/include/internal/ethread.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/erts/include/internal/ethread.h b/erts/include/internal/ethread.h
index aef31e282a..6c006b3f07 100644
--- a/erts/include/internal/ethread.h
+++ b/erts/include/internal/ethread.h
@@ -59,10 +59,6 @@
# undef ETHR_TRY_INLINE_FUNCS
#endif
-#if !defined(ETHR_DISABLE_NATIVE_IMPLS) && (defined(PURIFY)||defined(VALGRIND))
-# define ETHR_DISABLE_NATIVE_IMPLS
-#endif
-
/* Assume 64-byte cache line size */
#define ETHR_CACHE_LINE_SIZE 64
#define ETHR_CACHE_LINE_MASK (ETHR_CACHE_LINE_SIZE - 1)
@@ -413,7 +409,11 @@ extern ethr_runtime_t ethr_runtime__;
# endif
#endif
-#include "ethr_optimized_fallbacks.h"
+#ifdef VALGRIND /* mutex as fallback for spinlock for VALGRIND */
+# undef ETHR_HAVE_NATIVE_SPINLOCKS
+#else
+# include "ethr_optimized_fallbacks.h"
+#endif
typedef struct {
void *(*thread_create_prepare_func)(void);