diff options
author | Sverker Eriksson <[email protected]> | 2018-11-23 17:36:59 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2018-11-23 17:36:59 +0100 |
commit | ceeb321ca0e86a436c87eab2c38eae2380f78d1a (patch) | |
tree | 50d4998f8842dd45c3fc94ada5bc8c4924cbb5b2 /erts/emulator/beam | |
parent | 3d4ecf2f722dfb952bba57daaaef617500133fb9 (diff) | |
download | otp-ceeb321ca0e86a436c87eab2c38eae2380f78d1a.tar.gz otp-ceeb321ca0e86a436c87eab2c38eae2380f78d1a.tar.bz2 otp-ceeb321ca0e86a436c87eab2c38eae2380f78d1a.zip |
erts: Fix bug in counters
Wow, that could have been embarrassing.
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r-- | erts/emulator/beam/erl_bif_counters.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_bif_counters.c b/erts/emulator/beam/erl_bif_counters.c index 84496e83ef..7c8884ba32 100644 --- a/erts/emulator/beam/erl_bif_counters.c +++ b/erts/emulator/beam/erl_bif_counters.c @@ -130,7 +130,7 @@ static ERTS_INLINE int get_ref_cnt(Eterm ref, Eterm index, UWord ix, ui, vi; if (!get_ref(ref, &p) || !term_to_UWord(index, &ix) || --ix >= p->arity) return 0; - ui = (ix / ATOMICS_PER_CACHE_LINE) * ATOMICS_PER_COUNTER; + ui = (ix / ATOMICS_PER_CACHE_LINE) * ATOMICS_PER_COUNTER + sched_ix; vi = ix % ATOMICS_PER_CACHE_LINE; ASSERT(ui < p->ulen); *pp = p; |