svn commit: r237097 - projects/calloutng/sys/kern

Davide Italiano davide at FreeBSD.org
Thu Jun 14 20:21:01 UTC 2012


Author: davide
Date: Thu Jun 14 20:20:59 2012
New Revision: 237097
URL: http://svn.freebsd.org/changeset/base/237097

Log:
  callwheelbits variable was introduced long time ago but it's not really used.
  Get rid of it.
  
  Discussed with:		Matt Dillon

Modified:
  projects/calloutng/sys/kern/kern_timeout.c

Modified: projects/calloutng/sys/kern/kern_timeout.c
==============================================================================
--- projects/calloutng/sys/kern/kern_timeout.c	Thu Jun 14 20:05:12 2012	(r237096)
+++ projects/calloutng/sys/kern/kern_timeout.c	Thu Jun 14 20:20:59 2012	(r237097)
@@ -81,7 +81,7 @@ SYSCTL_INT(_debug, OID_AUTO, to_avg_mpca
  * TODO:
  *	allocate more timeout table slots when table overflows.
  */
-int callwheelsize, callwheelbits, callwheelmask;
+int callwheelsize, callwheelmask;
 
 /*
  * The callout cpu migration entity represents informations necessary for
@@ -225,10 +225,9 @@ kern_timeout_callwheel_alloc(caddr_t v)
 	/*
 	 * Calculate callout wheel size
 	 */
-	for (callwheelsize = 1, callwheelbits = 0;
-	     callwheelsize < ncallout;
-	     callwheelsize <<= 1, ++callwheelbits)
-		;
+	callwheelsize = 1;
+	while (callwheelsize < ncallout) 
+		callwheelsize <<= 1;
 	callwheelmask = callwheelsize - 1;
 
 	cc->cc_callout = (struct callout *)v;


More information about the svn-src-projects mailing list