aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2012-01-20 17:42:50 +0100
committerSverker Eriksson <[email protected]>2012-02-21 12:23:00 +0100
commit28a1a227f8097c5c593149f66a98a1b1cf796e99 (patch)
treec9afd7f630e23b80c34e89a831b7e8a459387265
parent0ebc1871238508783733423825d22967f5096d19 (diff)
downloadotp-28a1a227f8097c5c593149f66a98a1b1cf796e99.tar.gz
otp-28a1a227f8097c5c593149f66a98a1b1cf796e99.tar.bz2
otp-28a1a227f8097c5c593149f66a98a1b1cf796e99.zip
erts: Rename erts_load_module to erts_preload_module
As it can only be used at initialization for preloading
-rw-r--r--erts/emulator/beam/beam_load.c3
-rw-r--r--erts/emulator/beam/erl_init.c2
-rw-r--r--erts/emulator/beam/global.h4
3 files changed, 5 insertions, 4 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c
index e2a3914bf7..54dc663abe 100644
--- a/erts/emulator/beam/beam_load.c
+++ b/erts/emulator/beam/beam_load.c
@@ -558,7 +558,7 @@ define_file(LoaderState* stp, char* name, int idx)
}
Eterm
-erts_load_module(Process *c_p,
+erts_preload_module(Process *c_p,
ErtsProcLocks c_p_locks,
Eterm group_leader, /* Group leader or NIL if none. */
Eterm* modp, /*
@@ -571,6 +571,7 @@ erts_load_module(Process *c_p,
LoaderState* stp = erts_alloc_loader_state();
Eterm retval;
+ ASSERT(!erts_initialized);
retval = erts_prepare_loading(stp, c_p, group_leader, modp,
code, size);
if (retval != NIL) {
diff --git a/erts/emulator/beam/erl_init.c b/erts/emulator/beam/erl_init.c
index 54b3c19616..487c444df4 100644
--- a/erts/emulator/beam/erl_init.c
+++ b/erts/emulator/beam/erl_init.c
@@ -453,7 +453,7 @@ load_preloaded(void)
if ((code = sys_preload_begin(&preload_p[i])) == 0)
erl_exit(1, "Failed to find preloaded code for module %s\n",
name);
- res = erts_load_module(NULL, 0, NIL, &module_name, code, length);
+ res = erts_preload_module(NULL, 0, NIL, &module_name, code, length);
sys_preload_end(&preload_p[i]);
if (res != NIL)
erl_exit(1,"Failed loading preloaded module %s (%T)\n",
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h
index e6ff9d8577..6a3c36824b 100644
--- a/erts/emulator/beam/global.h
+++ b/erts/emulator/beam/global.h
@@ -878,8 +878,8 @@ Eterm erts_prepare_loading(struct LoaderState*, Process *c_p,
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, Uint size);
+Eterm erts_preload_module(Process *c_p, ErtsProcLocks c_p_locks,
+ 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,