Hi All,

Finally I was able to fix the issue. Few of the things I did:

a) Have definition and declaration in separate file ( Basic requirement :-)
).
b) For fast path used pragma directives for inline functions.

Thank you all,

---Reang.

On Wed, Aug 19, 2009 at 9:51 PM, Steven Stallion
<[email protected]>wrote:

> On Wed, 19 Aug 2009 12:01:24 -0400, Sebastien Roy <[email protected]>
> wrote:
> > Putting a static declaration in a header file is bad form; anything that
> > includes this header file but doesn't happen to use this static symbol
> > will end up with a lint warning.
> >
> > The fix is to move the static declaration to the .c file where it's
> > actually defined and used.
>
> +1
>
> There are a number of additional rules as well when it comes to using
> inlines; primarily, if you are declaring a static inline, then the
> definition *must* be within the same translation unit as the declaration.
> By placing this into a header, you are essentially forcing every bit of
> source which includes it to provide a static definition (code duplication).
> If this is not done, the compiler should complain (loudly) - at that point
> you can either make the inline extern (yech), or move the declaration back
> into the translation unit where it belongs.
>
> Steve
>
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to