Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Mar 2010 20:32:29 +0000 (UTC)
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r205025 - user/jmallett/octeon/sys/mips/mips
Message-ID:  <201003112032.o2BKWTrG089154@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003112032.o2BKWTrG089154>