Re: [2.6 patch] kill __always_inline

From: Andi Kleen
Date: Tue Aug 31 2004 - 19:17:09 EST


Nigel Cunningham <ncunningham@xxxxxxxxxxxxx> writes:
>
> Excuse me if I'm being ignorant, but I thought always_inline was
> introduced because with some recent versions of gcc, inline wasn't doing
> the job (suspend2, which requires a working inline, was broken by it for
> example). That is to say, doesn't the definition of always_inline vary
> with the compiler version?

It is just inline on some old gcc versions that didn't have
__attribute__((always_inline)). But on these plain inline is usually fine
- it will just inline. Only later versions of gcc broke their inlining
algorithm, but they luckily added this attribute as a workaround.

When you have functions that require inlining always mark them __always_inline

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/