From 38cdf3a9e4afaae77633a2b010758d42b9855bc0 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 27 Apr 2017 15:07:53 +0200 Subject: erts: Fix debug emulator on windows Clear ethr_not_inited__ early (like on unix) to not get assertion in ethr_tsd_key_create("stacklimit") --- erts/lib_src/win/ethread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'erts') diff --git a/erts/lib_src/win/ethread.c b/erts/lib_src/win/ethread.c index ba77b3dc88..98fcd2d451 100644 --- a/erts/lib_src/win/ethread.c +++ b/erts/lib_src/win/ethread.c @@ -203,6 +203,8 @@ ethr_init(ethr_init_data *id) if (!ethr_not_inited__) return EINVAL; + ethr_not_inited__ = 0; + #ifdef _WIN32_WINNT os_version.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&os_version); @@ -238,8 +240,6 @@ ethr_init(ethr_init_data *id) if (erts_get_cpu_configured(ethr_cpu_info__) == 1) child_wait_spin_count = 0; - ethr_not_inited__ = 0; - return 0; error: -- cgit v1.2.3