diff options
author | Sverker Eriksson <[email protected]> | 2012-02-15 15:12:18 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2012-02-21 15:32:07 +0100 |
commit | dc2b0ecba50cbe6b2f2321b1f24579a0353ced18 (patch) | |
tree | 0ad297a07792533c1d2820c5ca69a886f3239e03 /erts/emulator/beam/erl_init.c | |
parent | c4a8cc5914157c70ced742d957ec0e8d9c618164 (diff) | |
download | otp-dc2b0ecba50cbe6b2f2321b1f24579a0353ced18.tar.gz otp-dc2b0ecba50cbe6b2f2321b1f24579a0353ced18.tar.bz2 otp-dc2b0ecba50cbe6b2f2321b1f24579a0353ced18.zip |
erts: Activate staged code in a thread safe way
Activation of staged code is scheduled for a later moment when
all schedulers have done a full memory barrier. This allow
them to read active code index while executing without any
memory barriers at all.
Diffstat (limited to 'erts/emulator/beam/erl_init.c')
-rw-r--r-- | erts/emulator/beam/erl_init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_init.c b/erts/emulator/beam/erl_init.c index 2d192b3fc4..a4690891d5 100644 --- a/erts/emulator/beam/erl_init.c +++ b/erts/emulator/beam/erl_init.c @@ -1473,7 +1473,8 @@ erl_start(int argc, char **argv) init_shared_memory(boot_argc, boot_argv); load_preloaded(); - erts_commit_staging_code_ix(); + erts_end_staging_code_ix(); + erts_activate_staging_code_ix(); erts_initialized = 1; |