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 rnd_wakeup_readers.



details:   https://anonhg.NetBSD.org/src/rev/76d90bf988d8
branches:  trunk
changeset: 337443:76d90bf988d8
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Apr 14 14:16:34 2015 +0000

description:
Omit needless rnd_wakeup_readers.

diffstat:

 sys/kern/kern_rndq.c |  21 +++++----------------
 1 files changed, 5 insertions(+), 16 deletions(-)

diffs (70 lines):

diff -r 97b64d298c10 -r 76d90bf988d8 sys/kern/kern_rndq.c
--- a/sys/kern/kern_rndq.c      Tue Apr 14 14:11:51 2015 +0000
+++ b/sys/kern/kern_rndq.c      Tue Apr 14 14:16:34 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_rndq.c,v 1.61 2015/04/14 14:11:51 riastradh Exp $ */
+/*     $NetBSD: kern_rndq.c,v 1.62 2015/04/14 14:16:34 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.61 2015/04/14 14:11:51 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.62 2015/04/14 14:16:34 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -154,7 +154,6 @@
 
 static void *rnd_process, *rnd_wakeup;
 
-static        void     rnd_wakeup_readers(void);
 static inline uint32_t rnd_counter(void);
 static        void     rnd_intr(void *);
 static       void      rnd_wake(void *);
@@ -257,7 +256,7 @@
                rnd_schedule_softint(rnd_wakeup);
                return;
        }
-       rnd_wakeup_readers();
+       rndsinks_distribute();
 }
 
 /*
@@ -284,16 +283,6 @@
 }
 
 /*
- * Check to see if there are readers waiting on us.  If so, kick them.
- */
-static void
-rnd_wakeup_readers(void)
-{
-
-       rndsinks_distribute();
-}
-
-/*
  * Use the timing/value of the event to estimate the entropy gathered.
  * If all the differentials (first, second, and third) are non-zero, return
  * non-zero.  If any of these are zero, return zero.
@@ -1133,7 +1122,7 @@
 static void
 rnd_wake(void *arg)
 {
-       rnd_wakeup_readers();
+       rndsinks_distribute();
 }
 
 static uint32_t
@@ -1610,7 +1599,7 @@
                        rnd_entropy_added();
                        mutex_spin_exit(&rnd_global.lock);
 
-                       rnd_wakeup_readers();
+                       rndsinks_distribute();
                } else {
                        rnd_printf_verbose("rnd"
                            ": already seeded by boot loader\n");



Home | Main Index | Thread Index | Old Index