diff options
author | Sverker Eriksson <[email protected]> | 2012-03-07 16:16:44 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2012-03-07 16:16:44 +0100 |
commit | 16c60b70936070b0a568473c1d99466479446af2 (patch) | |
tree | e24322cea82c826b20cd9475fca77aaf3319ce41 | |
parent | 869237370df8133f0252ad2f803fcd6a152d98e7 (diff) | |
download | otp-16c60b70936070b0a568473c1d99466479446af2.tar.gz otp-16c60b70936070b0a568473c1d99466479446af2.tar.bz2 otp-16c60b70936070b0a568473c1d99466479446af2.zip |
erts: Fix assert failure when code_server exits "during" commit
Simplify by removing the support of abort_staging after end_staging.
-rw-r--r-- | erts/emulator/beam/code_ix.h | 4 | ||||
-rw-r--r-- | erts/emulator/beam/erl_process.c | 10 |
2 files changed, 5 insertions, 9 deletions
diff --git a/erts/emulator/beam/code_ix.h b/erts/emulator/beam/code_ix.h index 068ff0e6ba..6b2680044e 100644 --- a/erts/emulator/beam/code_ix.h +++ b/erts/emulator/beam/code_ix.h @@ -101,7 +101,7 @@ void erts_release_code_write_permission(void); void erts_start_staging_code_ix(void); /* End the staging. - * Preceded by "start" and followed by "commit" or "abort". + * Preceded by "start" and must be followed by "commit". */ void erts_end_staging_code_ix(void); @@ -111,7 +111,7 @@ void erts_end_staging_code_ix(void); void erts_commit_staging_code_ix(void); /* Abort the staging. - * Preceded by "start" or "end". + * Preceded by "start". */ void erts_abort_staging_code_ix(void); diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index a7707e9498..6c136571d5 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -1176,17 +1176,13 @@ handle_code_ix_activation(ErtsAuxWorkData *awdp, erts_aint32_t aux_work) #ifdef DEBUG awdp->code_ix_activation.code_stager = NULL; #endif + erts_commit_staging_code_ix(); + erts_release_code_write_permission(); erts_smp_proc_lock(p, ERTS_PROC_LOCK_STATUS); if (!ERTS_PROC_IS_EXITING(p)) { - erts_commit_staging_code_ix(); erts_resume(p, ERTS_PROC_LOCK_STATUS); - erts_smp_proc_unlock(p, ERTS_PROC_LOCK_STATUS); } - else { - erts_smp_proc_unlock(p, ERTS_PROC_LOCK_STATUS); - erts_abort_staging_code_ix(); - } - erts_release_code_write_permission(); + erts_smp_proc_unlock(p, ERTS_PROC_LOCK_STATUS); erts_smp_proc_dec_refc(p); return aux_work & ~ERTS_SSI_AUX_WORK_CODE_IX_ACTIVATION; } |