lkml.org 
[lkml]   [2007]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: can someone explain "inline" once and for all?
On 1/19/07, Robert P. J. Day <rpjday@mindspring.com> wrote:
> is there a simple explanation for how to *properly* define inline
> routines in the kernel? and maybe this can be added to the
> CodingStyle guide (he mused, wistfully).

AFAIK __always_inline is the only reliable way to force inlining where
it matters for correctness (for example, when playing tricks with
__builtin_return_address like we do in the slab).

Anything else is just a hint to the compiler that might be ignored if
the optimizer thinks it knows better.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-01-19 14:23    [W:0.059 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site