Subject: Re: CVS commit: src/sys/dev/ata
To: None <tech-kern@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: tech-kern
Date: 04/06/2006 13:14:51
In article <20060406130415.GA26897@baea.com.au>,
Brett Lymn <blymn@baesystems.com.au> wrote:
>On Thu, Apr 06, 2006 at 01:03:39PM +0530, Cherry G. Mathew wrote:
>>
>> Do we use varargs within the kernel already ? Wouldn't it pull in
>> compiler dependancies ( as you mention ) into the kernel ?
>>
>
>printf? ;)
>
>> AFAIU, the current hook subsystems ( shutdown, power etc. ) take a
>> fixed number of args. Couldn't you implement them as such with
>> EVENTHANDLER for a start and then move to varargs if required ?
>>
>
>Yes, the current ones do take a fixed number of args and in most
>instances you can get away with a single arg. The only time this is a
>problem is with the exec hook (I think it's that one) that wants two
>args. Originally I was thinking the args could be bundled up into a
>single structure but actually using varargs means you don't have to
>hack around a single arg limitation which can be nice.
>
>> Since EVENTHANDLER_INVOKE(name, ...) is a varargs macro, I assume it
>> isn't affected by the gcc problem you mention ?
>>
>
>No, from what I understand that _is_ the problem... gcc2 cannot handle
>varargs in macros, yamt pointed that out in the thread I started on
>tech-kern.
We can always do the double parenthesis hack until then.
christos