Subject: Re: CVS commit: src/sys/dev/ata
To: Christos Zoulas <christos@astron.com>
From: Cherry G. Mathew <cherry.g.mathew@gmail.com>
List: tech-kern
Date: 03/17/2007 02:19:26
On 4/6/06, Christos Zoulas <christos@astron.com> wrote:
> 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
>
>

Hi,

Can someone please try the patches kern/32766
http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=32766

and see if I broke anything ? If not, can we please have this committed ?

The changes are trivial but wide across ports (arch/, dev/,
kern/kern_subr.c ) and basically add an extra argument to
doshutdownhooks() to give context ( RB_XXXX) for the shutdown.

Since we last discussed this, I bought a new laptop, and the same
harddisk retract issue exists with poweroff. This should fix it.

Thanks,

-- 
~Cherry