From owner-freebsd-current Tue Feb 4 18:48:56 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id SAA20662 for current-outgoing; Tue, 4 Feb 1997 18:48:56 -0800 (PST) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id SAA20645; Tue, 4 Feb 1997 18:48:50 -0800 (PST) Received: (from msmith@localhost) by genesis.atrad.adelaide.edu.au (8.8.2/8.7.3) id NAA19221; Wed, 5 Feb 1997 13:17:18 +1030 (CST) From: Michael Smith Message-Id: <199702050247.NAA19221@genesis.atrad.adelaide.edu.au> Subject: Re: device driver open semantics... In-Reply-To: <199702050240.TAA13922@phaeton.artisoft.com> from Terry Lambert at "Feb 4, 97 07:40:36 pm" To: terry@lambert.org (Terry Lambert) Date: Wed, 5 Feb 1997 13:17:17 +1030 (CST) Cc: msmith@atrad.adelaide.edu.au, terry@lambert.org, bakul@torrentnet.com, phk@FreeBSD.ORG, current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Terry Lambert stands accused of saying: > > > I disagree. The driver should not depend on the system doing > > > reference counting for it. Mark me down as being "for" calling > > > the close once per close. Reference counting is a very simple > > > modification to make, and there are great benefits to things like > > > CDROM writers that can also function as readers, non-bidirectional > > > sound cards, etc., etc.. > > > > This would do horrible things to the fork/exec timings. 8( > > ... well, the exec() timings anyway, if the close_on_exec was set > on the fd open on the device, since fork wouldn't close(), > but must already open(), right? Ah, actually it'd be fork() that would suffer, as you'd have to go and call open() for every device that it had open. And it's not the calling that would cost, but scanning the open fds to see whether it had to be called for each. > Terry Lambert -- ]] Mike Smith, Software Engineer msmith@gsoft.com.au [[ ]] Genesis Software genesis@gsoft.com.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control. (ph) +61-8-8267-3493 [[ ]] Unix hardware collector. "Where are your PEZ?" The Tick [[