aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/time.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/erts/emulator/beam/time.c b/erts/emulator/beam/time.c
index cee3cb619f..a7e5a64b22 100644
--- a/erts/emulator/beam/time.c
+++ b/erts/emulator/beam/time.c
@@ -1364,21 +1364,29 @@ dbg_verify_empty_later_slots(ErtsTimerWheel *tiw, ErtsMonotonicTime to_pos)
tmp = to_pos;
tmp &= ERTS_TW_LATER_WHEEL_POS_MASK;
if (tmp > tiw->later.pos) {
+ ErtsMonotonicTime pos_min;
int slots;
tmp -= tiw->later.pos;
tmp /= ERTS_TW_LATER_WHEEL_SLOT_SIZE;
ERTS_TW_ASSERT(tmp > 0);
+
+ pos_min = tiw->later.pos;
+
if (tmp < (ErtsMonotonicTime) ERTS_TW_LATER_WHEEL_SIZE)
slots = (int) tmp;
- else
+ else {
+ pos_min += ((tmp / ERTS_TW_LATER_WHEEL_SIZE)
+ * ERTS_TW_LATER_WHEEL_SLOT_SIZE);
slots = ERTS_TW_LATER_WHEEL_SIZE;
+ }
while (slots > 0) {
ErtsTWheelTimer *tmr = tiw->w[ix];
+ pos_min += ERTS_TW_LATER_WHEEL_SLOT_SIZE;
if (tmr) {
ErtsTWheelTimer *end = tmr;
do {
- ERTS_TW_ASSERT(tmr->timeout_pos > to_pos);
+ ERTS_TW_ASSERT(tmr->timeout_pos >= pos_min);
tmr = tmr->next;
} while (tmr != end);
}