PERFORCE change 87405 for review

Peter Wemm peter at FreeBSD.org
Tue Nov 29 01:18:06 GMT 2005


http://perforce.freebsd.org/chv.cgi?CH=87405

Change 87405 by peter at 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


More information about the p4-projects mailing list