Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/tls-earlyentropy]: src/sys/kern Skip mutex_tryenter() if !kprnd_added.
details: https://anonhg.NetBSD.org/src/rev/7231926e44a0
branches: tls-earlyentropy
changeset: 795272:7231926e44a0
user: tls <tls%NetBSD.org@localhost>
date: Wed Apr 09 03:41:30 2014 +0000
description:
Skip mutex_tryenter() if !kprnd_added.
diffstat:
sys/kern/subr_prf.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r 992ae6295c33 -r 7231926e44a0 sys/kern/subr_prf.c
--- a/sys/kern/subr_prf.c Wed Apr 09 03:39:44 2014 +0000
+++ b/sys/kern/subr_prf.c Wed Apr 09 03:41:30 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_prf.c,v 1.153.2.1 2014/04/07 02:20:00 tls Exp $ */
+/* $NetBSD: subr_prf.c,v 1.153.2.2 2014/04/09 03:41:30 tls Exp $ */
/*-
* Copyright (c) 1986, 1988, 1991, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.153.2.1 2014/04/07 02:20:00 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.153.2.2 2014/04/09 03:41:30 tls Exp $");
#include "opt_ddb.h"
#include "opt_ipkdb.h"
@@ -144,8 +144,8 @@
static void kprintf_rnd_get(size_t bytes, void *priv)
{
- if (mutex_tryenter(&kprintf_mtx)) {
- if (kprnd_added) {
+ if (kprnd_added) {
+ if (mutex_tryenter(&kprintf_mtx)) {
SHA512_Final(kprnd_accum, &kprnd_sha);
rnd_add_data(&rnd_printf_source,
kprnd_accum, sizeof(kprnd_accum), 0);
Home |
Main Index |
Thread Index |
Old Index