Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Dec 2006 20:42:54 -0800
From:      Ade Lovett <ade@freebsd.org>
To:        mjacob@freebsd.org
Cc:        freebsd-scsi@freebsd.org
Subject:   Re: a code reduction function addition to cam_xpt
Message-ID:  <02408F0C-838D-496A-8BE3-6049C9E77C76@freebsd.org>
In-Reply-To: <20061204202639.B20246@ns1.feral.com>
References:  <20061119161631.L44297@ns1.feral.com> <3bbf2fe10611191631h6883b862uf8088533913a7bc6@mail.gmail.com> <20061120221153.GA5155@lor.one-eyed-alien.net> <3bbf2fe10611201418m15d50703m37d9d5620e5c832d@mail.gmail.com> <20061204150922.F18492@ns1.feral.com> <20061205140644.Q28464@delplex.bde.org> <20061204192720.P19791@ns1.feral.com> <ADB526BA-A898-431A-97DA-30DF3ACD7264@FreeBSD.org> <20061204202639.B20246@ns1.feral.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Dec 04, 2006, at 20:27 , mjacob@freebsd.org wrote:
>> On Dec 04, 2006, at 19:27 , mjacob@freebsd.org wrote:
>>> IOCCC?
>>
>> http://www.ioccc.org/
>>
>> Consider this another vote for "function" ;)
>
> Bruce is usually less indirect. What gives?


Multi-line #define's are 'orrible (IMO) -- of course, our tree is  
littered with them, but it's highly preferable to have a function  
over a define, particularly when it comes to reading the code n  
months later, trying to track something down.  In this particular  
case, the minimal overhead of calling a function rather than having  
it inline (via #define) is vastly outweighed by code-readability, and  
reduction in kernel size.

-aDe






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?02408F0C-838D-496A-8BE3-6049C9E77C76>