From owner-cvs-all Sat Jan 6 16:34:18 2001 From owner-cvs-all@FreeBSD.ORG Sat Jan 6 16:34:15 2001 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from VL-MS-MR003.sc1.videotron.ca (relais.videotron.ca [24.201.245.36]) by hub.freebsd.org (Postfix) with ESMTP id C3D1637B400; Sat, 6 Jan 2001 16:34:14 -0800 (PST) Received: from jehovah ([24.202.203.37]) by VL-MS-MR003.sc1.videotron.ca (Netscape Messaging Server 4.15) with SMTP id G6RO9100.E1B; Sat, 6 Jan 2001 19:34:13 -0500 Message-ID: <002f01c07841$bc0c8b80$25cbca18@jehovah> From: "Bosko Milekic" To: "Alfred Perlstein" Cc: , References: <200101062044.f06Kiex42615@freefall.freebsd.org> <20010106132943.E15744@fw.wintelcom.net> <005001c07839$40f06820$25cbca18@jehovah> <20010106161427.G15744@fw.wintelcom.net> Subject: Re: cvs commit: src/sys/dev/musycc musycc.c Date: Sat, 6 Jan 2001 19:35:28 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Alfred wrote: > * Bosko Milekic [010106 15:33] wrote: > > > > I find this incredibly dumb. You're just wasting a check that need not be > > made. I know when I have to free m and when not to, it's dumb to have to > > check it again in errfree. It's Poul's call, however. > > You have an exceptional condition, it reduces the amount of code > someone reading must digest and it should reduce the amount of code > the processor needs to put in the I cache. > > There is also a lot of code that already does this: > > sosend(), soreceive(), soclose(). > > What you're doing is giving a place to jump to further along in > case any other error conditions come up. > > One other question, is since so much code does this (get a header > and attach an mbuf cluster) why not have a generic all-or-nothing > macro for this? > > -- > -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] > "I have the heart of a child; I keep it in a jar on my desk." We should really have an mclget() function to handle this case and it should only be used when we're allocating an mbuf for the purpose of attaching an mbuf cluster. I'll probably hack one up later tonight and present it to you for review. This idea makes a lot of sense. Later, Bosko. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message