From owner-freebsd-hackers Mon Oct 16 18:08:03 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id SAA02075 for hackers-outgoing; Mon, 16 Oct 1995 18:08:03 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id SAA02069 for ; Mon, 16 Oct 1995 18:07:59 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id LAA16860; Tue, 17 Oct 1995 11:04:05 +1000 Date: Tue, 17 Oct 1995 11:04:05 +1000 From: Bruce Evans Message-Id: <199510170104.LAA16860@godzilla.zeta.org.au> To: bde@zeta.org.au, mark@grondar.za Subject: Re: Creating a /dev/random Cc: hackers@FreeBSD.org Sender: owner-hackers@FreeBSD.org Precedence: bulk >> To avoid this, use the existing buffer `zbuf', which is freed correctly. >> There is no need for another variable - local variables are per process. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> Perhaps `zbuf' should be renamed `buf'. >I don't understand something here - what happens if the one process is >reading both /dev/zero and /dev/random? will the two not then try to >share buf/zbuf and screw up? See above >> is inelegant anyway. Perhaps there should be a zeroout() function to >> optimize this important (;-) device. >...or only c bytes should be zero'ed out? Good idea. Bruce