tech-kern archive

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

Re: static functions are your friends (Was GPIO revisited)

Am 09.08.2009 um 19:40 schrieb Matt Thomas:

On Aug 9, 2009, at 10:33 AM, Marc Balmer wrote:

Am 09.08.2009 um 19:32 schrieb Matt Thomas:

On Aug 9, 2009, at 10:03 AM, Marc Balmer wrote:
We can consider this issue solved. I can declare my functions as "__noinline static ...." and have both the benefits of a static declaration and the function name show up in ddb's 'trace' command.

I will slowly convert my code to this idiom, if no one objects.

Please only do that if neither DIAGNOSTIC nor DEBUG is defined.

why do you suggest this?

Because the kernel is supposed to fully optimized if neither of those are present, even if it makes debugging harder.

I don't get it. If DEBUG or DIAGNOSTIC is defined, I should avoid __inline to make sure ddb does not show the symbols?

This is getting more and more silly.

My functions will just be non-static as long as stupid gcc/ddb combination is not able to display function names in 'trace'.

Please fix ddb, but don't ask me to static my functions.  kthxbye

Home | Main Index | Thread Index | Old Index