Re: [2.6 patch] kill __always_inline
From: Nigel Cunningham
Date: Tue Aug 31 2004 - 19:24:52 EST
Hi.
On Wed, 2004-09-01 at 09:39, Andrew Morton wrote:
> IIRC, the compiler was generating out-of-line versions of functions in
> every compilation unit whcih included the header file. When we the
> developers just wanted `inline' to mean `inline, dammit'.
>
> If that broke swsusp in some manner then the relevant swsusp functions
> should be marked always_inline, because they have some special needs.
Yes, that's exactly right. Suspend relies upon inline always inlining,
and as I work around I added...
#undef inline
#define inline __inline__ __attribute__(always_inline))
while this discussion was going on. I should switch this to
always_inline now that it's merged.
> > That is to say, doesn't the definition of always_inline vary
> > with the compiler version?
>
> If the compiler supports attribute((always_inline)) then the kernel build
> system will use that. If the compiler doesn't support
> attribute((always_inline)) then we just emit `inline' from cpp and hope
> that it works out.
Thanks.
Nigel
--
Nigel Cunningham
Christian Reformed Church of Tuggeranong
PO Box 1004, Tuggeranong, ACT 2901
Many today claim to be tolerant. But true tolerance can cope with others
being intolerant.
-
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/