aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/win32/sys.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2011-10-30 00:23:16 +0200
committerRickard Green <[email protected]>2011-11-13 20:40:59 +0100
commit15774d2ac5ba38dba287309f91eb7e4f58b9a636 (patch)
treeff9f7f07f0d5c2b807c1614fb2f44b31f505d672 /erts/emulator/sys/win32/sys.c
parentdcc7ecbf6af5420af2d5dbd0e97fc7a2e0e894a6 (diff)
downloadotp-15774d2ac5ba38dba287309f91eb7e4f58b9a636.tar.gz
otp-15774d2ac5ba38dba287309f91eb7e4f58b9a636.tar.bz2
otp-15774d2ac5ba38dba287309f91eb7e4f58b9a636.zip
Use critical sections as mutex implementation on Windows
Windows native critical sections are now used internally in the runtime system as mutex implementation. This since they perform better under extreme contention than our own implementation.
Diffstat (limited to 'erts/emulator/sys/win32/sys.c')
-rw-r--r--erts/emulator/sys/win32/sys.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/erts/emulator/sys/win32/sys.c b/erts/emulator/sys/win32/sys.c
index 02d16b83a2..6f33ef7ad6 100644
--- a/erts/emulator/sys/win32/sys.c
+++ b/erts/emulator/sys/win32/sys.c
@@ -216,6 +216,9 @@ void sys_tty_reset(int exit_code)
void erl_sys_args(int* argc, char** argv)
{
char *event_name;
+
+ erts_sys_env_init();
+
nohup = get_and_remove_option(argc, argv, "-nohup");
#ifdef DEBUG
@@ -3214,7 +3217,6 @@ erts_sys_pre_init(void)
}
#endif
erts_smp_atomic_init_nob(&sys_misc_mem_sz, 0);
- erts_sys_env_init();
}
void noinherit_std_handle(DWORD type)