Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev



On Thu, Dec 01, 2011 at 04:48:34PM -0500, Christos Zoulas wrote:
> On Dec 1,  5:50pm, david%l8s.co.uk@localhost (David Laight) wrote:
> -- Subject: Re: CVS commit: src/sys/dev
> 
> | I'd rather the .c file wasn't polluted with #ifdefs.
> | Probably better to #define fss_compat_ioctl(...) EINVAL somewhere.
> | 
> | We ought to sort out a way of making the compat code loadable
> | - in which case this would need to be a real function call
> | (possibly an indirect one).
> 
> I like that idea. Perhaps we can just make the compat symbols weak
> and check for NULL before calling them (or magic autoload module stubs).
> That is provided the loader does the necessary magic when it loads/unloads
> the module...

I think it might be easier to call via a function pointer,
and get the module load/unload code to update the variable.
A non-modular kernel could then contain a direct function call.

The updated code would need to go via some kind of wrapper
(in the main kernel) that held a reference count on the module.
Not sure that is easy without copying the arguments.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index