Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Omit needless call to rnd_getmore in rnd_extract_data.



details:   https://anonhg.NetBSD.org/src/rev/0c618ed38e56
branches:  trunk
changeset: 343620:0c618ed38e56
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Feb 17 01:01:42 2016 +0000

description:
Omit needless call to rnd_getmore in rnd_extract_data.

The only remaining caller -- rnd_extract -- already does it.

diffstat:

 sys/kern/kern_rndq.c |  10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diffs (31 lines):

diff -r 3df2647c3851 -r 0c618ed38e56 sys/kern/kern_rndq.c
--- a/sys/kern/kern_rndq.c      Wed Feb 17 00:57:36 2016 +0000
+++ b/sys/kern/kern_rndq.c      Wed Feb 17 01:01:42 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_rndq.c,v 1.77 2016/02/17 00:57:36 riastradh Exp $ */
+/*     $NetBSD: kern_rndq.c,v 1.78 2016/02/17 01:01:42 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.77 2016/02/17 00:57:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.78 2016/02/17 01:01:42 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -1232,12 +1232,6 @@
        retval = rndpool_extract_data(&rnd_global.pool, p, len, flags);
        mutex_spin_exit(&rnd_global.lock);
 
-       if (entropy_count < (RND_ENTROPY_THRESHOLD * 2 + len) * NBBY) {
-               rnd_printf_verbose("rnd: empty, asking for %d bytes\n",
-                   (int)(howmany((RND_POOLBITS - entropy_count), NBBY)));
-               rnd_getmore(howmany((RND_POOLBITS - entropy_count), NBBY));
-       }
-
        return retval;
 }
 



Home | Main Index | Thread Index | Old Index