Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Use rnd_add_data, not rndpool_mtx and rndpool_add_data.
details: https://anonhg.NetBSD.org/src/rev/e418a7c0d10e
branches: trunk
changeset: 337419:e418a7c0d10e
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Apr 14 12:14:09 2015 +0000
description:
Use rnd_add_data, not rndpool_mtx and rndpool_add_data.
diffstat:
sys/dev/rndpseudo.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diffs (40 lines):
diff -r acd1b4969a0f -r e418a7c0d10e sys/dev/rndpseudo.c
--- a/sys/dev/rndpseudo.c Tue Apr 14 11:59:40 2015 +0000
+++ b/sys/dev/rndpseudo.c Tue Apr 14 12:14:09 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rndpseudo.c,v 1.26 2015/04/13 15:13:50 riastradh Exp $ */
+/* $NetBSD: rndpseudo.c,v 1.27 2015/04/14 12:14:09 riastradh Exp $ */
/*-
* Copyright (c) 1997-2013 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rndpseudo.c,v 1.26 2015/04/13 15:13:50 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rndpseudo.c,v 1.27 2015/04/14 12:14:09 riastradh Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -190,9 +190,7 @@
/* Mix in another counter. */
c = rndpseudo_counter();
- mutex_spin_enter(&rndpool_mtx);
- rndpool_add_data(&rnd_pool, &c, sizeof(c), 1);
- mutex_spin_exit(&rndpool_mtx);
+ rnd_add_data(NULL, &c, sizeof(c), 1);
}
int
@@ -483,9 +481,7 @@
/*
* Mix in the bytes.
*/
- mutex_spin_enter(&rndpool_mtx);
- rndpool_add_data(&rnd_pool, bf, n, estimate);
- mutex_spin_exit(&rndpool_mtx);
+ rnd_add_data(NULL, bf, n, estimate);
added += n;
DPRINTF(RND_DEBUG_WRITE, ("Random: Copied in %d bytes\n", n));
Home |
Main Index |
Thread Index |
Old Index