aboutsummaryrefslogtreecommitdiffstats
path: root/erts/lib_src/common/ethr_aux.c
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2014-02-24 16:45:04 +0100
committerLukas Larsson <[email protected]>2014-02-24 16:45:04 +0100
commita157ffce8e25012512e0e5d88e05fb135792f161 (patch)
tree8c2bf21e8a401f696483d6e7d08ff00dd805c06c /erts/lib_src/common/ethr_aux.c
parent4ce83eb728748787f8a2da6155112c6da42a0eba (diff)
parent81abbc48e12317a07a8d2fcc041031c1c1567c8d (diff)
downloadotp-a157ffce8e25012512e0e5d88e05fb135792f161.tar.gz
otp-a157ffce8e25012512e0e5d88e05fb135792f161.tar.bz2
otp-a157ffce8e25012512e0e5d88e05fb135792f161.zip
Merge branch 'lukas/ose/master/OTP-11334'
* lukas/ose/master/OTP-11334: (71 commits) erts: Fix unix efile assert ose: Use -O2 when building ose: Expand OSE docs ose: Add dummy ttsl driver ose: Cleanup cleanup of mutex selection defines ose: Polish mmap configure checks ose: Add ose specific x-compile flags ose: Updating fd_driver and spawn_driver for OSE ose: Updating event and signal API for OSE ose: Cleanup of mutex selection defines win32: Compile erl_log.exe ose: Remove uneccesary define ose: Fix ssl configure test for osx erts: Fix sys_msg_dispatcher assert ose: Fix broken doc links ose: Thread priorities configurable from lmconf ose: Yielding the cpu is done "the OSE" way ose: Start using ppdata for tse key ose: Do not use spinlocks on OSE ose: Fix support for crypto ... Conflicts: lib/crypto/c_src/crypto.c
Diffstat (limited to 'erts/lib_src/common/ethr_aux.c')
-rw-r--r--erts/lib_src/common/ethr_aux.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/erts/lib_src/common/ethr_aux.c b/erts/lib_src/common/ethr_aux.c
index f4ff08d368..ceecdcef64 100644
--- a/erts/lib_src/common/ethr_aux.c
+++ b/erts/lib_src/common/ethr_aux.c
@@ -204,7 +204,18 @@ ethr_init_common__(ethr_init_data *id)
ethr_min_stack_size__ = ETHR_B2KW(ethr_min_stack_size__);
+#ifdef __OSE__
+ /* For supervisor processes, OSE adds a number of bytes to the requested stack. With this
+ * addition, the resulting size must not exceed the largest available stack size. The number
+ * of bytes that will be added is configured in the monolith and can therefore not be
+ * specified here. We simply assume that it is less than 0x1000. The available stack sizes
+ * are configured in the .lmconf file and the largest one is usually 65536 bytes.
+ * Consequently, the requested stack size is limited to 0xF000.
+ */
+ ethr_max_stack_size__ = 0xF000;
+#else
ethr_max_stack_size__ = 32*1024*1024;
+#endif
#if SIZEOF_VOID_P == 8
ethr_max_stack_size__ *= 2;
#endif
@@ -650,6 +661,10 @@ ETHR_IMPL_NORETURN__ ethr_fatal_error__(const char *file,
int ethr_assert_failed(const char *file, int line, const char *func, char *a)
{
fprintf(stderr, "%s:%d: %s(): Assertion failed: %s\n", file, line, func, a);
+#ifdef __OSE__
+ ramlog_printf("%d: %s:%d: %s(): Assertion failed: %s\n",
+ current_process(),file, line, func, a);
+#endif
ethr_abort__();
return 0;
}