aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/win32
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2015-03-21 14:35:24 +0100
committerRickard Green <[email protected]>2015-03-21 14:35:24 +0100
commitc8859fae10da567e13a0090c6cc04f4de634dc73 (patch)
treea933edfa62405fa11b09ede37f870d8d430c0b70 /erts/emulator/sys/win32
parentb99ce1c3a64f24e68b8a937338546fdf60501c65 (diff)
parent50713b7d6179477d6018e6a9ca5610617e3de1fe (diff)
downloadotp-c8859fae10da567e13a0090c6cc04f4de634dc73.tar.gz
otp-c8859fae10da567e13a0090c6cc04f4de634dc73.tar.bz2
otp-c8859fae10da567e13a0090c6cc04f4de634dc73.zip
Merge branch 'rickard/time_api/OTP-11997'
* rickard/time_api/OTP-11997: Unbreak lcnt
Diffstat (limited to 'erts/emulator/sys/win32')
-rw-r--r--erts/emulator/sys/win32/sys.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/erts/emulator/sys/win32/sys.c b/erts/emulator/sys/win32/sys.c
index 1ba87b8b0b..cf587af4ac 100644
--- a/erts/emulator/sys/win32/sys.c
+++ b/erts/emulator/sys/win32/sys.c
@@ -3172,25 +3172,31 @@ thr_create_prepare_child(void *vtcdp)
void
erts_sys_pre_init(void)
{
+#ifdef USE_THREADS
+ erts_thr_init_data_t eid = ERTS_THR_INIT_DATA_DEF_INITER;
+#endif
int_os_version.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&int_os_version);
check_supported_os_version();
+
#ifdef USE_THREADS
- {
- erts_thr_init_data_t eid = ERTS_THR_INIT_DATA_DEF_INITER;
+ eid.thread_create_child_func = thr_create_prepare_child;
+ /* Before creation in parent */
+ eid.thread_create_prepare_func = thr_create_prepare;
+ /* After creation in parent */
+ eid.thread_create_parent_func = thr_create_cleanup;
- eid.thread_create_child_func = thr_create_prepare_child;
- /* Before creation in parent */
- eid.thread_create_prepare_func = thr_create_prepare;
- /* After creation in parent */
- eid.thread_create_parent_func = thr_create_cleanup,
+ erts_thr_init(&eid);
+#endif
- erts_thr_init(&eid);
+ erts_init_sys_time_sup();
+
+#ifdef USE_THREADS
#ifdef ERTS_ENABLE_LOCK_COUNT
- erts_lcnt_init();
+ erts_lcnt_init();
#endif
- }
#endif
+
erts_smp_atomic_init_nob(&sys_misc_mem_sz, 0);
}