Source-Changes-HG archive

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

[src/trunk]: src/sys Make various things now private to kern_rndq.c static.



details:   https://anonhg.NetBSD.org/src/rev/1acafde73fd5
branches:  trunk
changeset: 337433:1acafde73fd5
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Apr 14 13:12:33 2015 +0000

description:
Make various things now private to kern_rndq.c static.

diffstat:

 sys/dev/rnd_private.h |  22 +---------------------
 sys/kern/kern_rndq.c  |  18 +++++++++---------
 2 files changed, 10 insertions(+), 30 deletions(-)

diffs (104 lines):

diff -r 3d8823b5d576 -r 1acafde73fd5 sys/dev/rnd_private.h
--- a/sys/dev/rnd_private.h     Tue Apr 14 13:08:22 2015 +0000
+++ b/sys/dev/rnd_private.h     Tue Apr 14 13:12:33 2015 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: rnd_private.h,v 1.9 2015/04/14 13:03:37 riastradh Exp $     */
+/*      $NetBSD: rnd_private.h,v 1.10 2015/04/14 13:12:33 riastradh Exp $     */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -58,7 +58,6 @@
 bool   rnd_extract(void *, size_t);
 bool   rnd_tryextract(void *, size_t);
 void   rnd_getmore(size_t);
-void   rnd_wakeup_readers(void);
 
 /*
  * Flag indicating rnd_init has run.
@@ -66,25 +65,6 @@
 extern int             rnd_ready;
 
 /*
- * Bootloader-supplied entropy.  Use only in tests against NULL to
- * determine whether the bootloader supplied entropy.
- */
-extern rndsave_t       *boot_rsp;
-
-/*
- * List of rndsources.
- */
-LIST_HEAD(rndsource_head, krndsource);
-
-/*
- * Global entropy pool state.  Access to everything here is serialized
- * by rndpool_mtx.
- */
-extern kmutex_t                        rndpool_mtx;
-extern rndpool_t               rnd_pool;
-extern struct rndsource_head   rnd_sources;
-
-/*
  * Debugging flags.
  */
 #ifdef RND_DEBUG
diff -r 3d8823b5d576 -r 1acafde73fd5 sys/kern/kern_rndq.c
--- a/sys/kern/kern_rndq.c      Tue Apr 14 13:08:22 2015 +0000
+++ b/sys/kern/kern_rndq.c      Tue Apr 14 13:12:33 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_rndq.c,v 1.55 2015/04/14 13:08:22 riastradh Exp $ */
+/*     $NetBSD: kern_rndq.c,v 1.56 2015/04/14 13:12:33 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.55 2015/04/14 13:08:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.56 2015/04/14 13:12:33 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -132,9 +132,9 @@
  * (rnd_samples, see above), and processed in a timeout routine; therefore,
  * the mutex protecting the random pool is at IPL_SOFTCLOCK() as well.
  */
-rndpool_t rnd_pool;
-kmutex_t  rndpool_mtx;
-kcondvar_t rndpool_cv;
+static rndpool_t rnd_pool;
+static kmutex_t  rndpool_mtx;
+static kcondvar_t rndpool_cv;
 
 /*
  * This source is used to easily "remove" queue entries when the source
@@ -157,7 +157,7 @@
 
 void *rnd_process, *rnd_wakeup;
 
-void                   rnd_wakeup_readers(void);
+static        void     rnd_wakeup_readers(void);
 static inline uint32_t rnd_counter(void);
 static        void     rnd_intr(void *);
 static       void      rnd_wake(void *);
@@ -177,9 +177,9 @@
 static uint8_t         rnd_testbits[sizeof(rnd_rt.rt_b)];
 #endif
 
-struct rndsource_head  rnd_sources;
+static LIST_HEAD(, krndsource) rnd_sources;
 
-rndsave_t              *boot_rsp;
+static rndsave_t       *boot_rsp;
 
 static inline void
 rnd_printf(const char *fmt, ...)
@@ -291,7 +291,7 @@
 /*
  * Check to see if there are readers waiting on us.  If so, kick them.
  */
-void
+static void
 rnd_wakeup_readers(void)
 {
 



Home | Main Index | Thread Index | Old Index