Module Name: src Committed By: riastradh Date: Tue Apr 14 13:12:33 UTC 2015
Modified Files: src/sys/dev: rnd_private.h src/sys/kern: kern_rndq.c Log Message: Make various things now private to kern_rndq.c static. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/rnd_private.h cvs rdiff -u -r1.55 -r1.56 src/sys/kern/kern_rndq.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/rnd_private.h diff -u src/sys/dev/rnd_private.h:1.9 src/sys/dev/rnd_private.h:1.10 --- src/sys/dev/rnd_private.h:1.9 Tue Apr 14 13:03:37 2015 +++ src/sys/dev/rnd_private.h Tue Apr 14 13:12:33 2015 @@ -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 Index: src/sys/kern/kern_rndq.c diff -u src/sys/kern/kern_rndq.c:1.55 src/sys/kern/kern_rndq.c:1.56 --- src/sys/kern/kern_rndq.c:1.55 Tue Apr 14 13:08:22 2015 +++ src/sys/kern/kern_rndq.c Tue Apr 14 13:12:33 2015 @@ -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_auto 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) {