From 3c798b2b1f7ff7866cfd267d8f065df3ed64c751 Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Tue, 7 Feb 2017 16:01:07 +0000 Subject: [PATCH] locks: follow up r313386 Unfinished diff was committed by accident. The loop in lock_delay was changed to decrement, but the loop iterator was still incrementing. --- sys/kern/subr_lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/subr_lock.c b/sys/kern/subr_lock.c index 2ed5fdb6bb7..8584525922f 100644 --- a/sys/kern/subr_lock.c +++ b/sys/kern/subr_lock.c @@ -128,7 +128,7 @@ lock_delay(struct lock_delay_arg *la) if (__predict_false(la->delay > lc->max)) la->delay = lc->max; - for (i = la->delay; i > 0; i++) + for (i = la->delay; i > 0; i--) cpu_spinwait(); la->spin_cnt += la->delay;