From owner-svn-src-head@FreeBSD.ORG Mon May 25 22:50:12 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 721171065670; Mon, 25 May 2009 22:50:12 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4650B8FC16; Mon, 25 May 2009 22:50:12 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4PMoCVr038299; Mon, 25 May 2009 22:50:12 GMT (envelope-from markm@svn.freebsd.org) Received: (from markm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4PMoCRt038297; Mon, 25 May 2009 22:50:12 GMT (envelope-from markm@svn.freebsd.org) Message-Id: <200905252250.n4PMoCRt038297@svn.freebsd.org> From: Mark Murray Date: Mon, 25 May 2009 22:50:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r192774 - head/sys/dev/random X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 May 2009 22:50:12 -0000 Author: markm Date: Mon May 25 22:50:11 2009 New Revision: 192774 URL: http://svn.freebsd.org/changeset/base/192774 Log: There is rubbish here It is time to take it out Now it is cleaner Modified: head/sys/dev/random/nehemiah.c head/sys/dev/random/randomdev_soft.c Modified: head/sys/dev/random/nehemiah.c ============================================================================== --- head/sys/dev/random/nehemiah.c Mon May 25 21:29:06 2009 (r192773) +++ head/sys/dev/random/nehemiah.c Mon May 25 22:50:11 2009 (r192774) @@ -129,7 +129,7 @@ random_nehemiah_init(void) { acw.raw = 0ULL; acw.field.round_count = 12; - + mtx_init(&random_nehemiah_mtx, "random nehemiah", NULL, MTX_DEF); } Modified: head/sys/dev/random/randomdev_soft.c ============================================================================== --- head/sys/dev/random/randomdev_soft.c Mon May 25 21:29:06 2009 (r192773) +++ head/sys/dev/random/randomdev_soft.c Mon May 25 22:50:11 2009 (r192774) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2004 Mark R V Murray + * Copyright (c) 2000-2009 Mark R V Murray * Copyright (c) 2004 Robert N. M. Watson * All rights reserved. * @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); #define RANDOM_FIFO_MAX 256 /* How many events to queue up */ static void random_kthread(void *); -static void +static void random_harvest_internal(u_int64_t, const void *, u_int, u_int, u_int, enum esource); static int random_yarrow_poll(int event,struct thread *td); @@ -235,7 +235,7 @@ random_kthread(void *arg __unused) { STAILQ_HEAD(, harvest) local_queue; struct harvest *event = NULL; - int active, local_count; + int local_count; enum esource source; STAILQ_INIT(&local_queue); @@ -244,8 +244,6 @@ random_kthread(void *arg __unused) /* Process until told to stop */ for (; random_kthread_control >= 0;) { - active = 0; - /* Cycle through all the entropy sources */ mtx_lock_spin(&harvest_mtx); for (source = RANDOM_START; source < ENTROPYSOURCE; source++) { @@ -284,9 +282,8 @@ random_kthread(void *arg __unused) if (random_kthread_control == 1) random_kthread_control = 0; - /* Found nothing, so don't belabour the issue */ - if (!active) - pause("-", hz / 10); + /* Work done, so don't belabour the issue */ + pause("-", hz / 10); } @@ -381,7 +378,7 @@ random_yarrow_poll(int events, struct th revents = events & (POLLIN | POLLRDNORM); else selrecord(td, &random_systat.rsel); - + mtx_unlock(&random_reseed_mtx); return revents; } @@ -407,7 +404,7 @@ random_yarrow_block(int flag) mtx_unlock(&random_reseed_mtx); return error; -} +} /* Helper routine to perform explicit reseeds */ static void