Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Xor, not ior, to combine bits of binuptime for rnd_counter.
details: https://anonhg.NetBSD.org/src/rev/e615470e9bff
branches: trunk
changeset: 337622:e615470e9bff
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Apr 21 12:07:31 2015 +0000
description:
Xor, not ior, to combine bits of binuptime for rnd_counter.
diffstat:
sys/dev/rndpseudo.c | 10 +++++-----
sys/kern/kern_rndq.c | 10 +++++-----
2 files changed, 10 insertions(+), 10 deletions(-)
diffs (62 lines):
diff -r 17e8cd00e3cd -r e615470e9bff sys/dev/rndpseudo.c
--- a/sys/dev/rndpseudo.c Tue Apr 21 11:53:53 2015 +0000
+++ b/sys/dev/rndpseudo.c Tue Apr 21 12:07:31 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rndpseudo.c,v 1.31 2015/04/14 12:51:30 riastradh Exp $ */
+/* $NetBSD: rndpseudo.c,v 1.32 2015/04/21 12:07:31 riastradh Exp $ */
/*-
* Copyright (c) 1997-2013 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rndpseudo.c,v 1.31 2015/04/14 12:51:30 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rndpseudo.c,v 1.32 2015/04/21 12:07:31 riastradh Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -168,9 +168,9 @@
binuptime(&bt);
ret = bt.sec;
- ret |= bt.sec >> 32;
- ret |= bt.frac;
- ret |= bt.frac >> 32;
+ ret ^= bt.sec >> 32;
+ ret ^= bt.frac;
+ ret ^= bt.frac >> 32;
return ret;
}
diff -r 17e8cd00e3cd -r e615470e9bff sys/kern/kern_rndq.c
--- a/sys/kern/kern_rndq.c Tue Apr 21 11:53:53 2015 +0000
+++ b/sys/kern/kern_rndq.c Tue Apr 21 12:07:31 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_rndq.c,v 1.68 2015/04/21 03:53:07 riastradh Exp $ */
+/* $NetBSD: kern_rndq.c,v 1.69 2015/04/21 12:07:31 riastradh Exp $ */
/*-
* Copyright (c) 1997-2013 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.68 2015/04/21 03:53:07 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.69 2015/04/21 12:07:31 riastradh Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -216,9 +216,9 @@
binuptime(&bt);
ret = bt.sec;
- ret |= bt.sec >> 32;
- ret |= bt.frac;
- ret |= bt.frac >> 32;
+ ret ^= bt.sec >> 32;
+ ret ^= bt.frac;
+ ret ^= bt.frac >> 32;
return ret;
}
Home |
Main Index |
Thread Index |
Old Index