aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2016-11-25 15:23:54 +0100
committerRickard Green <[email protected]>2016-11-25 15:23:54 +0100
commitad8c29d74e4cf43f48f2ce11aeea451ad51a7e45 (patch)
treeaf20460b285b5807dcb77defd638d816dc5daf45 /erts/emulator/sys
parent0fccaf80ab2348bbb99b7d2d8c25a3de77eebdeb (diff)
parentf8aef2dcae7162b59efb9513442c9643c9f5159e (diff)
downloadotp-ad8c29d74e4cf43f48f2ce11aeea451ad51a7e45.tar.gz
otp-ad8c29d74e4cf43f48f2ce11aeea451ad51a7e45.tar.bz2
otp-ad8c29d74e4cf43f48f2ce11aeea451ad51a7e45.zip
Merge branch 'maint'
* maint: 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 51366adf1d..4b2edace0a 100644
--- a/erts/emulator/sys/unix/sys.c
+++ b/erts/emulator/sys/unix/sys.c
@@ -412,6 +412,10 @@ erts_sys_pre_init(void)
erts_thr_init(&eid);
+#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 404e72d176..f3881e0736 100644
--- a/erts/emulator/sys/win32/sys.c
+++ b/erts/emulator/sys/win32/sys.c
@@ -3186,16 +3186,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);
}