summaryrefslogtreecommitdiffstats
path: root/sys/dev/random/yarrow.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2000-11-25 19:13:29 +0000
committermarkm <markm@FreeBSD.org>2000-11-25 19:13:29 +0000
commit6ac673bf3ce6085f5f69239cbe8b7c589420612f (patch)
tree6330dea7cb1bd93c13cc0160be5cdb9de47357eb /sys/dev/random/yarrow.c
parentcad5a0b6850de5fd5f30e60d61d0101ca92d3daa (diff)
downloadFreeBSD-src-6ac673bf3ce6085f5f69239cbe8b7c589420612f.zip
FreeBSD-src-6ac673bf3ce6085f5f69239cbe8b7c589420612f.tar.gz
Greatly improve the boot-up unblocking time of the entropy device.
Diffstat (limited to 'sys/dev/random/yarrow.c')
-rw-r--r--sys/dev/random/yarrow.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/random/yarrow.c b/sys/dev/random/yarrow.c
index 8480897..c53e7c1 100644
--- a/sys/dev/random/yarrow.c
+++ b/sys/dev/random/yarrow.c
@@ -455,9 +455,6 @@ write_random(void *buf, u_int count)
random_harvest_internal(get_cyclecount(), (char *)buf + i, count,
0, 0, RANDOM_WRITE);
}
-
- /* Explicit reseed */
- reseed(FAST);
}
static void
@@ -527,3 +524,10 @@ random_harvest_internal(u_int64_t somecounter, void *entropy, u_int count,
mtx_exit(&random_harvest_mtx, MTX_DEF);
}
}
+
+/* Helper routine to perform explicit reseeds */
+void
+random_reseed(void)
+{
+ reseed(FAST);
+}
OpenPOWER on IntegriCloud