aboutsummaryrefslogtreecommitdiffstats
path: root/erts/include
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2014-02-14 14:39:49 +0100
committerLukas Larsson <[email protected]>2014-02-24 15:16:06 +0100
commitc6d34b4d3e6c7817d066dbe20e9c569ae332d2a6 (patch)
treeec9e9b50d668be2dd777ec555413aba8365d5c91 /erts/include
parent6c4ee8337dff6e9b680dbff0796038948d718b5a (diff)
downloadotp-c6d34b4d3e6c7817d066dbe20e9c569ae332d2a6.tar.gz
otp-c6d34b4d3e6c7817d066dbe20e9c569ae332d2a6.tar.bz2
otp-c6d34b4d3e6c7817d066dbe20e9c569ae332d2a6.zip
ose: Do not use spinlocks on OSE
This is because it is very easy to deadlock/livelock inbetween processes on OSE.
Diffstat (limited to 'erts/include')
-rw-r--r--erts/include/internal/ethread.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/erts/include/internal/ethread.h b/erts/include/internal/ethread.h
index 7307bde8d9..9b1313c538 100644
--- a/erts/include/internal/ethread.h
+++ b/erts/include/internal/ethread.h
@@ -220,6 +220,7 @@ typedef OSPPDKEY ethr_tsd_key;
#define ETHR_HAVE_THREAD_NICENESS
#define ETHR_PPC_HAVE_NO_LWSYNC
+#undef ETHR_HAVE_NATIVE_SPINLOCKS
#else /* No supported thread lib found */
@@ -457,7 +458,11 @@ extern ethr_runtime_t ethr_runtime__;
# endif
#endif
-#ifdef VALGRIND /* mutex as fallback for spinlock for VALGRIND */
+#if defined(VALGRIND) || defined(ETHR_OSE_THREADS)
+/* mutex as fallback for spinlock for VALGRIND and OSE.
+ OSE cannot use spinlocks as processes working on the
+ same execution unit have a tendency to deadlock.
+ */
# undef ETHR_HAVE_NATIVE_SPINLOCKS
# undef ETHR_HAVE_NATIVE_RWSPINLOCKS
#else