diff options
author | Sverker Eriksson <[email protected]> | 2013-01-28 14:36:59 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2013-01-28 14:36:59 +0100 |
commit | b59b81bf13b2666496a5789125f5d53fb4d2b88a (patch) | |
tree | 9a36262eaac2f8046a94561888fd6883a85f3f53 /erts/emulator/beam/code_ix.h | |
parent | 58482ed3f2b2f90f8be35b85d5d16f3f40f80fa3 (diff) | |
parent | 9d61b560f2d8a08d6cfc95dd09c0d37c1d994153 (diff) | |
download | otp-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/code_ix.h')
-rw-r--r-- | erts/emulator/beam/code_ix.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/erts/emulator/beam/code_ix.h b/erts/emulator/beam/code_ix.h index e2bd0da112..3f4f9776a4 100644 --- a/erts/emulator/beam/code_ix.h +++ b/erts/emulator/beam/code_ix.h @@ -76,7 +76,7 @@ ErtsCodeIndex erts_active_code_ix(void); /* Return staging code ix. * Only used by a process performing code loading/upgrading/deleting/purging. - * code_ix must be locked. + * Code write permission must be seized. */ ERTS_GLB_INLINE ErtsCodeIndex erts_staging_code_ix(void); @@ -84,9 +84,10 @@ ErtsCodeIndex erts_staging_code_ix(void); /* Try seize exclusive code write permission. Needed for code staging. * Main process lock (only) must be held. * System thread progress must not be blocked. + * Caller must not already hold the code write permission. * Caller is suspended and *must* yield if 0 is returned. */ -int erts_try_seize_code_write_permission(struct process*); +int erts_try_seize_code_write_permission(struct process* c_p); /* Release code write permission. * Will resume any suspended waiters. |