diff options
author | Sverker Eriksson <[email protected]> | 2012-01-19 12:10:20 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2012-02-21 12:22:58 +0100 |
commit | aac03c5e9ccf9f6066e291a7c87dd58c1181c227 (patch) | |
tree | 149f9533c5fae8b64c7c083eb211b9902be9db1c /erts/emulator/beam/beam_load.c | |
parent | 5ed73504d7409a449ec4e0c0de421a93c4570e3b (diff) | |
download | otp-aac03c5e9ccf9f6066e291a7c87dd58c1181c227.tar.gz otp-aac03c5e9ccf9f6066e291a7c87dd58c1181c227.tar.bz2 otp-aac03c5e9ccf9f6066e291a7c87dd58c1181c227.zip |
erts: Multiple module tables using code_ix
Diffstat (limited to 'erts/emulator/beam/beam_load.c')
-rw-r--r-- | erts/emulator/beam/beam_load.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c index c35841af9d..fc3e395e91 100644 --- a/erts/emulator/beam/beam_load.c +++ b/erts/emulator/beam/beam_load.c @@ -5027,7 +5027,7 @@ erts_module_info_0(Process* p, Eterm module) return THE_NON_VALUE; } - if (erts_get_module(module) == NULL) { + if (erts_get_module(module, erts_active_code_ix()) == NULL) { return THE_NON_VALUE; } @@ -5091,7 +5091,7 @@ functions_in_module(Process* p, /* Process whose heap to use. */ return THE_NON_VALUE; } - modp = erts_get_module(mod); + modp = erts_get_module(mod, erts_active_code_ix()); if (modp == NULL) { return THE_NON_VALUE; } @@ -5145,7 +5145,7 @@ native_addresses(Process* p, Eterm mod) return THE_NON_VALUE; } - modp = erts_get_module(mod); + modp = erts_get_module(mod, erts_active_code_ix()); if (modp == NULL) { return THE_NON_VALUE; } @@ -5247,7 +5247,7 @@ attributes_for_module(Process* p, /* Process whose heap to use. */ return THE_NON_VALUE; } - modp = erts_get_module(mod); + modp = erts_get_module(mod, erts_active_code_ix()); if (modp == NULL) { return THE_NON_VALUE; } @@ -5287,7 +5287,7 @@ compilation_info_for_module(Process* p, /* Process whose heap to use. */ return THE_NON_VALUE; } - modp = erts_get_module(mod); + modp = erts_get_module(mod, erts_active_code_ix()); if (modp == NULL) { return THE_NON_VALUE; } @@ -6147,6 +6147,7 @@ void erts_start_loader_code_ix(void) { beam_catches_start_load(); export_start_load(); + module_start_load(); /*SVERK and more to come I guess... : */ @@ -6158,8 +6159,10 @@ void erts_commit_loader_code_ix(void) { beam_catches_end_load(1); export_end_load(1); + module_end_load(1); { - ErtsCodeIndex ix = erts_loader_code_ix(); + ErtsCodeIndex ix; + ix = erts_loader_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_loader_code_index, ix); @@ -6171,20 +6174,21 @@ void erts_abort_loader_code_ix(void) { beam_catches_end_load(0); export_end_load(0); + module_end_load(0); CIX_TRACE("abort"); } /*SVERK old_code lock should maybe be part of module.c */ -void erts_rwlock_old_code(void) +void erts_rwlock_old_code(ErtsCodeIndex code_ix) { } -void erts_rwunlock_old_code(void) +void erts_rwunlock_old_code(ErtsCodeIndex code_ix) { } -void erts_rlock_old_code(void) +void erts_rlock_old_code(ErtsCodeIndex code_ix) { } -void erts_runlock_old_code(void) +void erts_runlock_old_code(ErtsCodeIndex code_ix) { } |