tech-kern archive

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

Re: Newbie Kernel Programmer looking for first project.

In article 
Michael Litchard <> wrote:
>Thanks for the help so far. Here is where I'm at.
>When I see a pattern like this:
>#idef DEBUG
>   printf("foo"...);
>I replace those three line with
>   aprint_debug("foo...");
>the reasoning being that aprint_debug uses AB_DEBUG to govern behavior,
>and a new convention is replacing the old.
>But I'm starting to question this. I see more complex preprocessor commands,
>and now I wonder if I should just leave them alone. Could you give me some
>                          Michael Litchard

This is a bad thing in general because it always adds code to the kernel
and it also slows down execution, because it needs to compute the arguments,
and call the function. With the macro we get rid of the code. Perhaps it
is better to have an APRINT_DEBUG() varyadic macro.


Home | Main Index | Thread Index | Old Index