svn commit: r205025 - user/jmallett/octeon/sys/mips/mips

Juli Mallett jmallett at FreeBSD.org
Thu Mar 11 20:32:29 UTC 2010


Author: jmallett
Date: Thu Mar 11 20:32:28 2010
New Revision: 205025
URL: http://svn.freebsd.org/changeset/base/205025

Log:
  I don't know that a critical section is required here, but if it is we really
  don't want to get interrupted between reading the counter and calculating the
  ticks.

Modified:
  user/jmallett/octeon/sys/mips/mips/tick.c

Modified: user/jmallett/octeon/sys/mips/mips/tick.c
==============================================================================
--- user/jmallett/octeon/sys/mips/mips/tick.c	Thu Mar 11 17:56:46 2010	(r205024)
+++ user/jmallett/octeon/sys/mips/mips/tick.c	Thu Mar 11 20:32:28 2010	(r205025)
@@ -117,8 +117,8 @@ tick_ticker(void)
 	 * from the time counter, so I'm not sure why all these hoops
 	 * are even necessary.
 	 */
-	ticktock = mips_rd_count();
 	critical_enter();
+	ticktock = mips_rd_count();
 	if (ticktock < counter_lower_last)
 		counter_upper++;
 	counter_lower_last = ticktock;


More information about the svn-src-user mailing list