diff options
author | Björn-Egil Dahlberg <[email protected]> | 2010-05-06 20:18:21 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2010-06-03 14:54:21 +0200 |
commit | ff9531eb5e6aaa5a4802db0db5e0e850f4233702 (patch) | |
tree | aad69f5d5bc1ceb56b6476a016b744d2bb02567b /erts/emulator/beam/erl_nif.c | |
parent | 9a5848fc667acb2aedeb39af94d16a9b346aa47e (diff) | |
download | otp-ff9531eb5e6aaa5a4802db0db5e0e850f4233702.tar.gz otp-ff9531eb5e6aaa5a4802db0db5e0e850f4233702.tar.bz2 otp-ff9531eb5e6aaa5a4802db0db5e0e850f4233702.zip |
Add a scheduler array for BpData at BeamInstr[-4]
To solve the issue of multiple schedulers constantly updating the
head pointer to the bp data wheel, each scheduler now has its own
entrypoint to the wheel. This head pointer can be updated without
a locking being taken. Previously there were no lock ...
Diffstat (limited to 'erts/emulator/beam/erl_nif.c')
-rw-r--r-- | erts/emulator/beam/erl_nif.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c index 75de00d4c1..3d63fa1caf 100644 --- a/erts/emulator/beam/erl_nif.c +++ b/erts/emulator/beam/erl_nif.c @@ -1546,7 +1546,8 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2) code_ptr[5+0] = (BeamInstr) BeamOp(op_call_nif); } else { /* Function traced, patch the original instruction word */ - BpData* bp = (BpData*) code_ptr[1]; + BpData** bps = (BpData**) code_ptr[1]; + BpData* bp = (BpData*) bps[bp_sched2ix()]; bp->orig_instr = (BeamInstr) BeamOp(op_call_nif); } code_ptr[5+1] = (BeamInstr) entry->funcs[i].fptr; |