aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_load.c
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/beam/beam_load.c')
-rw-r--r--erts/emulator/beam/beam_load.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c
index 54dc663abe..cc4bdea20e 100644
--- a/erts/emulator/beam/beam_load.c
+++ b/erts/emulator/beam/beam_load.c
@@ -6018,10 +6018,12 @@ void erts_commit_loader_code_ix(void)
erts_end_load_ranges(1);
{
ErtsCodeIndex ix;
+ export_write_lock();
ix = erts_loader_code_ix();
erts_smp_atomic32_set_nob(&the_active_code_index, ix);
ix = (ix + 1) % ERTS_NUM_CODE_IX;
erts_smp_atomic32_set_nob(&the_loader_code_index, ix);
+ export_write_unlock();
}
CIX_TRACE("commit");
}