[illumos-Developer] Cluster hook functions in "inet/tcp.h"

Sergio Lopez sergio.lopez at nologin.es
Thu Feb 3 10:53:10 PST 2011


El Tue, 01 Feb 2011 10:53:48 -0800
Garrett D'Amore <garrett at damore.org> escribió:

> On 02/ 1/11 08:31 AM, Sergio Lopez wrote:
> > Well, I think this is an special situation, since those functions
> > aren't conventional callbacks, but kernel provided hooks to be used
> > by modules.
> >    
> 
> Then they should be protected by #ifdef _KERNEL.
> 
> > We can easily change IHAC to avoid this problem, but I still have
> > the feeling that it's a bit weird to have those declarations in a
> > public header. Probably, the cleanest solution would be to remove
> > those external symbols and provide a function to register the
> > hooks, but this is, perhaps, a mid-term solution.
> >    
> 
> "Public header" means that interfaces are exposed to external code.
> As IHAC is such code, the header is where it belongs.  The fact that
> it is in kernel code is orthogonal -- see my comment above about
> -D_KERNEL. :-)
> 

Looking at those hooks, it doesn't seem like the guys at Sun thought of
Sun Cluster as an external product ;-). Anyway, I'm fine with just
protecting them with "#ifdef _KERNEL", but, in this case, I think the
rest of the hooks (cl_inet_bind, cl_inet_disconnect...) should be
included too.

Should I prepare a patch with this change?



More information about the Developer mailing list