aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/code_ix.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2012-02-15 17:08:47 +0100
committerSverker Eriksson <[email protected]>2012-02-21 15:32:07 +0100
commitcd63cd50bae6d98d6d56fa24674f14e7b9457a37 (patch)
treed29626de041a5212203858839cddfe45e3468feb /erts/emulator/beam/code_ix.c
parentdc2b0ecba50cbe6b2f2321b1f24579a0353ced18 (diff)
downloadotp-cd63cd50bae6d98d6d56fa24674f14e7b9457a37.tar.gz
otp-cd63cd50bae6d98d6d56fa24674f14e7b9457a37.tar.bz2
otp-cd63cd50bae6d98d6d56fa24674f14e7b9457a37.zip
erts: Refactor export staging lock
Renamed it export_staging_lock and made change it to ordinary mutex.
Diffstat (limited to 'erts/emulator/beam/code_ix.c')
-rw-r--r--erts/emulator/beam/code_ix.c5
1 files changed, 3 insertions, 2 deletions
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");
}