From owner-freebsd-arch Mon Sep 11 22:56:58 2000 Delivered-To: freebsd-arch@freebsd.org Received: from smtp02.iafrica.com (smtp02.iafrica.com [196.7.0.140]) by hub.freebsd.org (Postfix) with ESMTP id 0652637B424 for ; Mon, 11 Sep 2000 22:56:54 -0700 (PDT) Received: from [196.7.18.138] (helo=grimreaper.grondar.za ident=root) by smtp02.iafrica.com with esmtp (Exim 1.92 #1) id 13Yj3o-000Pjg-00; Tue, 12 Sep 2000 07:56:49 +0200 Received: from grimreaper.grondar.za (mark@localhost [127.0.0.1]) by grimreaper.grondar.za (8.11.0/8.11.0) with ESMTP id e8C5ubX72439; Tue, 12 Sep 2000 07:56:38 +0200 (SAST) (envelope-from mark@grimreaper.grondar.za) Message-Id: <200009120556.e8C5ubX72439@grimreaper.grondar.za> To: Greg Lehey Cc: John Baldwin , FreeBSD-arch@FreeBSD.org Subject: Re: cvs commit: src/sys/conf files src/sys/sys random.h src/sys/dev/randomdev hash.c hash.h harvest.c randomdev.c yarrow.c yarro References: <20000912091705.O19431@wantadilla.lemis.com> In-Reply-To: <20000912091705.O19431@wantadilla.lemis.com> ; from Greg Lehey "Tue, 12 Sep 2000 09:17:05 +0930." Date: Tue, 12 Sep 2000 07:56:36 +0200 From: Mark Murray Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I've been wondering whether we shouldn't associate mutexes with data > structures rather than code. It's possible that it would make it > easier to avoid deadlocks. Thoughts? That was exactly what I did with the 2 mutexes in the /dev/random driver. One mutex protects the entropy-harvesting FIFO, and the other protects the internal state structure during reseeds. M -- Mark Murray Join the anti-SPAM movement: http://www.cauce.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message