Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Nov 2005 01:18:05 GMT
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 87405 for review
Message-ID:  <200511290118.jAT1I5wD042291@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=87405

Change 87405 by peter@peter_daintree on 2005/11/29 01:17:18

	So, there was no need to turn to use 3 files when 1 would do.

Affected files ...

.. //depot/projects/hammer/sys/amd64/amd64/tsc.c#13 edit
.. //depot/projects/hammer/sys/amd64/include/clock.h#18 edit
.. //depot/projects/hammer/sys/amd64/isa/clock.c#51 edit

Differences ...

==== //depot/projects/hammer/sys/amd64/amd64/tsc.c#13 (text+ko) ====

@@ -128,15 +128,3 @@
 {
 	return (rdtsc());
 }
-
-void
-tsc_DELAY(int n)
-{
-	uint64_t start, end, now;
-
-	start = rdtsc();
-	end = start + (tsc_freq * n) / 1000000;
-	do {
-		now = rdtsc();
-	} while (now < end || (now > start && end < start));
-}

==== //depot/projects/hammer/sys/amd64/include/clock.h#18 (text+ko) ====

@@ -37,7 +37,6 @@
 int	sysbeep(int pitch, int period);
 void	init_TSC(void);
 void	init_TSC_tc(void);
-void	tsc_DELAY(int);
 
 #endif /* _KERNEL */
 

==== //depot/projects/hammer/sys/amd64/isa/clock.c#51 (text+ko) ====

@@ -272,7 +272,13 @@
 #endif
 
 	if (tsc_freq != 0 && !tsc_is_broken) {
-		tsc_DELAY(n);
+		uint64_t start, end, now;
+
+		start = rdtsc();
+		end = start + (tsc_freq * n) / 1000000;
+		do {
+			now = rdtsc();
+		} while (now < end || (now > start && end < start));
 		return;
 	}
 #ifdef DELAYDEBUG



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