From cd63cd50bae6d98d6d56fa24674f14e7b9457a37 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Wed, 15 Feb 2012 17:08:47 +0100 Subject: erts: Refactor export staging lock Renamed it export_staging_lock and made change it to ordinary mutex. --- erts/emulator/beam/code_ix.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'erts/emulator/beam/code_ix.c') diff --git a/erts/emulator/beam/code_ix.c b/erts/emulator/beam/code_ix.c index 5565b51e7e..d4bf75558d 100644 --- a/erts/emulator/beam/code_ix.c +++ b/erts/emulator/beam/code_ix.c @@ -78,12 +78,13 @@ void erts_end_staging_code_ix(void) void erts_activate_staging_code_ix(void) { ErtsCodeIndex ix; - export_write_lock(); + /* We need to this lock as we are now making the staging export table active */ + export_staging_lock(); ix = erts_staging_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_staging_code_index, ix); - export_write_unlock(); + export_staging_unlock(); CIX_TRACE("activate"); } -- cgit v1.2.3