Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 KNF. No functional change.
details: https://anonhg.NetBSD.org/src/rev/4dcb336c5528
branches: trunk
changeset: 343852:4dcb336c5528
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Feb 28 20:51:03 2016 +0000
description:
KNF. No functional change.
diffstat:
sys/arch/x86/x86/cpu_rng.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (36 lines):
diff -r 61bddcc20716 -r 4dcb336c5528 sys/arch/x86/x86/cpu_rng.c
--- a/sys/arch/x86/x86/cpu_rng.c Sun Feb 28 20:47:01 2016 +0000
+++ b/sys/arch/x86/x86/cpu_rng.c Sun Feb 28 20:51:03 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_rng.c,v 1.3 2016/02/27 00:54:59 tls Exp $ */
+/* $NetBSD: cpu_rng.c,v 1.4 2016/02/28 20:51:03 riastradh Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -49,7 +49,8 @@
CPU_RNG_NONE = 0,
CPU_RNG_RDRAND,
CPU_RNG_RDSEED,
- CPU_RNG_VIA } cpu_rng_mode __read_mostly = CPU_RNG_NONE;
+ CPU_RNG_VIA
+} cpu_rng_mode __read_mostly = CPU_RNG_NONE;
bool
cpu_rng_init(void)
@@ -104,7 +105,7 @@
#ifdef __i386__
uint32_t lo, hi;
-
+
__asm __volatile("rdseed %0; setc %1" : "=r"(lo), "=qm"(rndsts));
if (rndsts != 1)
goto exhausted;
@@ -178,6 +179,7 @@
size_t
cpu_rng(cpu_rng_t *out)
{
+
switch (cpu_rng_mode) {
case CPU_RNG_NONE:
return 0;
Home |
Main Index |
Thread Index |
Old Index