aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/beam/module.c')
-rw-r--r--erts/emulator/beam/module.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/erts/emulator/beam/module.c b/erts/emulator/beam/module.c
index 26c73fff1a..d3fd3f118d 100644
--- a/erts/emulator/beam/module.c
+++ b/erts/emulator/beam/module.c
@@ -37,6 +37,8 @@
static IndexTable module_tables[ERTS_NUM_CODE_IX];
+erts_smp_rwmtx_t the_old_code_rwlocks[ERTS_NUM_CODE_IX];
+
/*
* SMP note: We don't need to look accesses to the module table because
* there is one only scheduler thread when we update it.
@@ -100,6 +102,10 @@ void init_module_table(void)
erts_index_init(ERTS_ALC_T_MODULE_TABLE, &module_tables[i], "module_code",
MODULE_SIZE, MODULE_LIMIT, f);
}
+
+ for (i=0; i<ERTS_NUM_CODE_IX; i++) {
+ erts_smp_rwmtx_init_x(&the_old_code_rwlocks[i], "old_code", make_small(i));
+ }
}
Module*
@@ -211,3 +217,4 @@ void module_end_staging(int commit)
IF_DEBUG(dbg_load_code_ix = -1);
}
+