aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/sys.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-02-08 18:00:45 +0100
committerSverker Eriksson <[email protected]>2016-02-08 18:00:45 +0100
commit6392637b184ac3172c61025889f3087e5739bb72 (patch)
tree7defce40c56982e16580c15a607dc3e0048a81c2 /erts/emulator/beam/sys.h
parentfcb5fc90e891d56b83927c8403d97da0faca0e41 (diff)
parente9d6797e15e687828e5ef0d33fb790181d657779 (diff)
downloadotp-6392637b184ac3172c61025889f3087e5739bb72.tar.gz
otp-6392637b184ac3172c61025889f3087e5739bb72.tar.bz2
otp-6392637b184ac3172c61025889f3087e5739bb72.zip
Merge branch 'sverk/thread-unsafe-alloc'
* sverk/thread-unsafe-alloc: erts: Fix faulty assert for non-smp erts: Add checks for thread safe allocation
Diffstat (limited to 'erts/emulator/beam/sys.h')
-rw-r--r--erts/emulator/beam/sys.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h
index e77b4b2dc8..068d636a40 100644
--- a/erts/emulator/beam/sys.h
+++ b/erts/emulator/beam/sys.h
@@ -207,6 +207,12 @@ __decl_noreturn void __noreturn erl_assert_error(const char* expr, const char *f
# define ASSERT(e) ((void) 1)
#endif
+#ifdef ERTS_SMP
+# define ERTS_SMP_ASSERT(e) ASSERT(e)
+#else
+# define ERTS_SMP_ASSERT(e) ((void)1)
+#endif
+
/* ERTS_UNDEF can be used to silence false warnings about
* "variable may be used uninitialized" while keeping the variable
* marked as undefined by valgrind.