Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys Pull up fix from current: let cpu_counter() be wide...
details: https://anonhg.NetBSD.org/src/rev/b5e0c782ad9c
branches: netbsd-1-5
changeset: 488357:b5e0c782ad9c
user: sommerfeld <sommerfeld%NetBSD.org@localhost>
date: Sun Jul 02 23:32:02 2000 +0000
description:
Pull up fix from current: let cpu_counter() be wider than 32 bits on
platforms for which is the case; clip to 32 bits in rnd.c
Approved by thorpej
diffstat:
sys/arch/i386/include/rnd.h | 4 ++--
sys/dev/rnd.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r c6cb9ce71fde -r b5e0c782ad9c sys/arch/i386/include/rnd.h
--- a/sys/arch/i386/include/rnd.h Sun Jul 02 17:41:17 2000 +0000
+++ b/sys/arch/i386/include/rnd.h Sun Jul 02 23:32:02 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rnd.h,v 1.2 2000/06/06 01:33:17 sommerfeld Exp $ */
+/* $NetBSD: rnd.h,v 1.2.2.1 2000/07/02 23:32:03 sommerfeld Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
#endif
}
-static __inline u_int32_t
+static __inline u_int64_t
cpu_counter(void)
{
return rdtsc();
diff -r c6cb9ce71fde -r b5e0c782ad9c sys/dev/rnd.c
--- a/sys/dev/rnd.c Sun Jul 02 17:41:17 2000 +0000
+++ b/sys/dev/rnd.c Sun Jul 02 23:32:02 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rnd.c,v 1.20 2000/06/06 01:33:15 sommerfeld Exp $ */
+/* $NetBSD: rnd.c,v 1.20.2.1 2000/07/02 23:32:02 sommerfeld Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -178,7 +178,7 @@
#ifdef __HAVE_CPU_COUNTER
if (cpu_hascounter())
- return cpu_counter();
+ return (cpu_counter() & 0xffffffff);
#endif
microtime(&tv);
Home |
Main Index |
Thread Index |
Old Index