aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/global.h
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-11-10 14:42:47 +0100
committerBjörn Gustavsson <[email protected]>2011-11-14 14:47:18 +0100
commit0b27c0ce578db5266dbaaa50a6d116836a03aa94 (patch)
tree9ee2bacc604351671484a9e752e1f096389c3016 /erts/emulator/beam/global.h
parent4de78fc7542905a519ec52b91769df63f8939952 (diff)
downloadotp-0b27c0ce578db5266dbaaa50a6d116836a03aa94.tar.gz
otp-0b27c0ce578db5266dbaaa50a6d116836a03aa94.tar.bz2
otp-0b27c0ce578db5266dbaaa50a6d116836a03aa94.zip
BEAM loader: Refactor code loading into separate functions
Break apart code loading into the three functions: erts_alloc_loader_state() erts_prepare_loading() erts_finish_loading() The erts_alloc_loader_state() and erts_prepare_loading() can be executed with all schedulers running. Only erts_finish_loading() needs to be run in a single-scheduling system.
Diffstat (limited to 'erts/emulator/beam/global.h')
-rw-r--r--erts/emulator/beam/global.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h
index 6c75c3876b..9f19172e08 100644
--- a/erts/emulator/beam/global.h
+++ b/erts/emulator/beam/global.h
@@ -866,8 +866,14 @@ typedef struct {
Eterm* fname_ptr; /* Pointer to fname table */
} FunctionInfo;
+struct LoaderState* erts_alloc_loader_state(void);
+Eterm erts_prepare_loading(struct LoaderState*, Process *c_p,
+ Eterm group_leader, Eterm* modp,
+ byte* code, Uint size);
+Eterm erts_finish_loading(struct LoaderState* stp, Process* c_p,
+ ErtsProcLocks c_p_locks, Eterm* modp);
Eterm erts_load_module(Process *c_p, ErtsProcLocks c_p_locks,
- Eterm group_leader, Eterm* mod, byte* code, int size);
+ Eterm group_leader, Eterm* mod, byte* code, Uint size);
void init_load(void);
BeamInstr* find_function_from_pc(BeamInstr* pc);
Eterm* erts_build_mfa_item(FunctionInfo* fi, Eterm* hp,