aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2016-09-26 15:05:21 +0200
committerRickard Green <[email protected]>2016-09-26 15:31:33 +0200
commitca7578aca806a6eb3e816c918120db78f485f5cb (patch)
tree4cd7798128a3956d5332feeb501289bd690a8732 /erts/emulator/sys
parent74a95b3d511177a9b35c2b0272b9ca5511b6f750 (diff)
downloadotp-ca7578aca806a6eb3e816c918120db78f485f5cb.tar.gz
otp-ca7578aca806a6eb3e816c918120db78f485f5cb.tar.bz2
otp-ca7578aca806a6eb3e816c918120db78f485f5cb.zip
Fix initialization dependencies between time, lock-check and lcnt
Diffstat (limited to 'erts/emulator/sys')
-rw-r--r--erts/emulator/sys/unix/sys.c4
-rw-r--r--erts/emulator/sys/win32/sys.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/erts/emulator/sys/unix/sys.c b/erts/emulator/sys/unix/sys.c
index b036b20b7b..e0a3bbdff0 100644
--- a/erts/emulator/sys/unix/sys.c
+++ b/erts/emulator/sys/unix/sys.c
@@ -559,6 +559,10 @@ erts_sys_pre_init(void)
report_exit_list = NULL;
+#ifdef ERTS_ENABLE_LOCK_CHECK
+ erts_lc_init();
+#endif
+
#ifdef ERTS_ENABLE_LOCK_COUNT
erts_lcnt_init();
#endif
diff --git a/erts/emulator/sys/win32/sys.c b/erts/emulator/sys/win32/sys.c
index fce76db28f..b7360a758e 100644
--- a/erts/emulator/sys/win32/sys.c
+++ b/erts/emulator/sys/win32/sys.c
@@ -3188,16 +3188,16 @@ erts_sys_pre_init(void)
eid.thread_create_parent_func = thr_create_cleanup;
erts_thr_init(&eid);
+#ifdef ERTS_ENABLE_LOCK_CHECK
+ erts_lc_init();
#endif
-
- erts_init_sys_time_sup();
-
-#ifdef USE_THREADS
#ifdef ERTS_ENABLE_LOCK_COUNT
erts_lcnt_init();
#endif
#endif
+ erts_init_sys_time_sup();
+
erts_smp_atomic_init_nob(&sys_misc_mem_sz, 0);
}