aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_bp.c
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-11-15 15:59:44 +0100
committerBjörn Gustavsson <[email protected]>2011-11-25 10:59:38 +0100
commit687dfb57c61ef9a777f706b73b14da93aa3ea448 (patch)
tree78f990bb9bfcfa1b16a2c6c342150e8e8fb70e08 /erts/emulator/beam/beam_bp.c
parent6e7de55f346e632b3f29835f7678a7ecfb464d99 (diff)
downloadotp-687dfb57c61ef9a777f706b73b14da93aa3ea448.tar.gz
otp-687dfb57c61ef9a777f706b73b14da93aa3ea448.tar.bz2
otp-687dfb57c61ef9a777f706b73b14da93aa3ea448.zip
Fix clang linking problem
Inlining was not done in a portable way. clang follows the C99 semantics for inlining ('inline' essentially implies 'static' in C99, but not in GCC), so bp_sched2ix() was not visible outside beam_bp.c. Since the function need to be used from more than one source file, put the function definition in the beam_bp.h header file. Also, give it an 'erts_' prefix since it is globally visible.
Diffstat (limited to 'erts/emulator/beam/beam_bp.c')
-rw-r--r--erts/emulator/beam/beam_bp.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/erts/emulator/beam/beam_bp.c b/erts/emulator/beam/beam_bp.c
index dd31376a2d..692fa61fe8 100644
--- a/erts/emulator/beam/beam_bp.c
+++ b/erts/emulator/beam/beam_bp.c
@@ -495,16 +495,6 @@ erts_find_local_func(Eterm mfa[3]) {
return NULL;
}
-/* bp_hash */
-ERTS_INLINE Uint bp_sched2ix() {
-#ifdef ERTS_SMP
- ErtsSchedulerData *esdp;
- esdp = erts_get_scheduler_data();
- return esdp->no - 1;
-#else
- return 0;
-#endif
-}
static void bp_hash_init(bp_time_hash_t *hash, Uint n) {
Uint size = sizeof(bp_data_time_item_t)*n;
Uint i;
@@ -1347,7 +1337,7 @@ static BpData *is_break(BeamInstr *pc, BeamInstr break_op) {
return NULL;
}
- bd = ebd = rs[bp_sched2ix()];
+ bd = ebd = rs[erts_bp_sched2ix()];
ASSERT(bd);
if ( (break_op == 0) || (bd->this_instr == break_op)) {
return bd;