svn commit: r313390 - head/sys/kern

Mateusz Guzik mjg at FreeBSD.org
Tue Feb 7 16:01:08 UTC 2017


Author: mjg
Date: Tue Feb  7 16:01:07 2017
New Revision: 313390
URL: https://svnweb.freebsd.org/changeset/base/313390

Log:
  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.

Modified:
  head/sys/kern/subr_lock.c

Modified: head/sys/kern/subr_lock.c
==============================================================================
--- head/sys/kern/subr_lock.c	Tue Feb  7 15:16:01 2017	(r313389)
+++ head/sys/kern/subr_lock.c	Tue Feb  7 16:01:07 2017	(r313390)
@@ -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;


More information about the svn-src-all mailing list