diff options
author | Sverker Eriksson <[email protected]> | 2016-02-08 18:00:45 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-02-08 18:00:45 +0100 |
commit | 6392637b184ac3172c61025889f3087e5739bb72 (patch) | |
tree | 7defce40c56982e16580c15a607dc3e0048a81c2 /erts/emulator/beam/sys.h | |
parent | fcb5fc90e891d56b83927c8403d97da0faca0e41 (diff) | |
parent | e9d6797e15e687828e5ef0d33fb790181d657779 (diff) | |
download | otp-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.h | 6 |
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. |