From owner-freebsd-smp Sat Jan 12 19:10: 5 2002 Delivered-To: freebsd-smp@freebsd.org Received: from albatross.prod.itd.earthlink.net (albatross.mail.pas.earthlink.net [207.217.120.120]) by hub.freebsd.org (Postfix) with ESMTP id BA09137B419; Sat, 12 Jan 2002 19:10:00 -0800 (PST) Received: from pool0052.cvx21-bradley.dialup.earthlink.net ([209.179.192.52] helo=mindspring.com) by albatross.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16Pb1v-0007Qx-00; Sat, 12 Jan 2002 19:09:55 -0800 Message-ID: <3C40FA80.89C73745@mindspring.com> Date: Sat, 12 Jan 2002 19:09:52 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: John Baldwin Cc: Alfred Perlstein , tanimura@freebsd.org, dillon@freebsd.org, smp@freebsd.org Subject: Re: fd locking. References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org John Baldwin wrote: > Could you change these to return a reference to the fp like crhold()? > > Thus you end up with code like > > newfp = fhold(oldfp) which reads better and documents what the old > and new references are. It's actually a Terry suggestion. :) FWIW, the reason I wanted this was to let me instrument the operations transparently to the caller, which you can't do unless this is the way it works. That it also looks pretty is just gravy. 8-). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message