aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_bif_load.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-01-28 14:36:59 +0100
committerSverker Eriksson <[email protected]>2013-01-28 14:36:59 +0100
commitb59b81bf13b2666496a5789125f5d53fb4d2b88a (patch)
tree9a36262eaac2f8046a94561888fd6883a85f3f53 /erts/emulator/beam/beam_bif_load.c
parent58482ed3f2b2f90f8be35b85d5d16f3f40f80fa3 (diff)
parent9d61b560f2d8a08d6cfc95dd09c0d37c1d994153 (diff)
downloadotp-b59b81bf13b2666496a5789125f5d53fb4d2b88a.tar.gz
otp-b59b81bf13b2666496a5789125f5d53fb4d2b88a.tar.bz2
otp-b59b81bf13b2666496a5789125f5d53fb4d2b88a.zip
Merge branch 'sverk/code_write_permission-assert'
* sverk/code_write_permission-assert: erts: Fix ASSERT crash in erts_try_seize_code_write_permission
Diffstat (limited to 'erts/emulator/beam/beam_bif_load.c')
-rw-r--r--erts/emulator/beam/beam_bif_load.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/erts/emulator/beam/beam_bif_load.c b/erts/emulator/beam/beam_bif_load.c
index e0a4f86d2d..73264214ce 100644
--- a/erts/emulator/beam/beam_bif_load.c
+++ b/erts/emulator/beam/beam_bif_load.c
@@ -389,16 +389,16 @@ static void smp_code_ix_commiter(void* null)
Process* p = commiter_state.stager;
erts_commit_staging_code_ix();
+#ifdef DEBUG
+ commiter_state.stager = NULL;
+#endif
+ erts_release_code_write_permission();
erts_smp_proc_lock(p, ERTS_PROC_LOCK_STATUS);
if (!ERTS_PROC_IS_EXITING(p)) {
erts_resume(p, ERTS_PROC_LOCK_STATUS);
}
erts_smp_proc_unlock(p, ERTS_PROC_LOCK_STATUS);
erts_smp_proc_dec_refc(p);
-#ifdef DEBUG
- commiter_state.stager = NULL;
-#endif
- erts_release_code_write_permission();
}
#endif /* ERTS_SMP */