summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2015-04-14 13:12:33 +0000
committerriastradh <riastradh@NetBSD.org>2015-04-14 13:12:33 +0000
commit2b850ff8a97aa77bde0c2e7e3c2f6eabb6d2f6f5 (patch)
tree0aeee1628b0ba2a21d5ea2e60d1a5a0d1a0aa71d
parent96ede3be221d4cbb7580adcb7bb50defa5932873 (diff)
Make various things now private to kern_rndq.c static.
-rw-r--r--sys/dev/rnd_private.h22
-rw-r--r--sys/kern/kern_rndq.c18
2 files changed, 10 insertions, 30 deletions
diff --git a/sys/dev/rnd_private.h b/sys/dev/rnd_private.h
index 9a900194625..cf45846beed 100644
--- a/sys/dev/rnd_private.h
+++ b/sys/dev/rnd_private.h
@@ -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 @@ void rnd_wakeup_readers(void);
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 --git a/sys/kern/kern_rndq.c b/sys/kern/kern_rndq.c
index 1679afd8156..f1b501c6044 100644
--- a/sys/kern/kern_rndq.c
+++ b/sys/kern/kern_rndq.c
@@ -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 @@ static pool_cache_t rnd_mempc;
* (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 @@ krndsource_t rnd_printf_source, rnd_autoconf_source;
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 rngtest_t rnd_rt;
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 @@ rnd_getmore(size_t byteswanted)
/*
* Check to see if there are readers waiting on us. If so, kick them.
*/
-void
+static void
rnd_wakeup_readers(void)
{