Subject: Re: merge of freebsd eventhandler
To: Chapman Flack <nblists@anastigmatix.net>
From: Brett Lymn <blymn@baesystems.com.au>
List: tech-kern
Date: 05/28/2006 01:17:13
On Fri, May 26, 2006 at 12:23:35PM -0400, Chapman Flack wrote:
> 
> Was it only powerhooks that needed reversal, while all the other hooks
> use a common order that the new powerhook order now conforms to?
> 

No, there were some others but powerhooks was the bulk of the changes.

> How would it be to provide a new function for establishing powerhooks,
> deprecate the old one, and provide the old one in a version that simply
> enqueues a trivial argument-reversing wrapper for the passed hook
> function?
> 

No, it's not the establish that is the problem, it's the hook function
that gets called (the powerhook_establish was just a type change for
the function argument).  To start swizzling the function arguments
would be a difficult task because you would have to somehow apply that
wrapper to each hook function on the hook list in a dynamic fashion.

I understand your concerns and did think about the impact of
arbitrarily changing the argument order but I cannot see any way to
avoid it.  Whichever way you go someone is going to be affected.

I _will_ bump the kernel version for this if it gets committed.

-- 
Brett Lymn