mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [x86-64 patch 10/11] random.c precise timers on x86-64
@ 2001-09-13 16:43 Vojtech Pavlik
  0 siblings, 0 replies; only message in thread
From: Vojtech Pavlik @ 2001-09-13 16:43 UTC (permalink / raw)
  To: torvalds

Hi!

This patch adds precise timing support on x86-64 into random.c.

diff -urN linux-x86_64/drivers/char/random.c linux/drivers/char/random.c
--- linux-x86_64/drivers/char/random.c	Thu Sep 13 15:17:33 2001
+++ linux/drivers/char/random.c	Tue Sep 11 09:49:17 2001
@@ -717,6 +717,10 @@
 	} else {
 		time = jiffies;
 	}
+#elif defined (__x86_64__)
+	__u32 high;
+	rdtsc(time, high);
+	num ^= high;
 #else
 	time = jiffies;
 #endif

-- 
Vojtech Pavlik
SuSE Labs

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-09-13 16:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-13 16:43 [x86-64 patch 10/11] random.c precise timers on x86-64 Vojtech Pavlik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®