diff options
author | Sverker Eriksson <[email protected]> | 2012-02-15 17:08:47 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2012-02-21 15:32:07 +0100 |
commit | cd63cd50bae6d98d6d56fa24674f14e7b9457a37 (patch) | |
tree | d29626de041a5212203858839cddfe45e3468feb /erts/emulator/beam/code_ix.c | |
parent | dc2b0ecba50cbe6b2f2321b1f24579a0353ced18 (diff) | |
download | otp-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.c | 5 |
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"); } |