mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* inline (and variants) function modifier
@ 2004-11-19 13:26 Jan Beulich
  2004-11-20 10:02 ` Jan Engelhardt
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2004-11-19 13:26 UTC (permalink / raw)
  To: linux-kernel

May I ask how one is supposed to write a non-static function and let the
compiler decide whether it is worth inlining? Since all of 'inline',
'__inline', and '__inline__' get __attribute__((always_inline))
attached, I can't see how I would currently do this. Wouldn't it make
sense to leave at least one of the three with its original meaning?

Additionally, while on a subject like this, is there a reason
attributes (as the above) are generally specified without leading (and
trailing) double underscores? This way, if I #define a symbol with the
name of an existing (or even future) attribute, things are going to
break, whereas conventions preclude me from #define-ing symbols with
double leading underscores.

Thank you,
Jan

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: inline (and variants) function modifier
  2004-11-19 13:26 inline (and variants) function modifier Jan Beulich
@ 2004-11-20 10:02 ` Jan Engelhardt
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Engelhardt @ 2004-11-20 10:02 UTC (permalink / raw)
  To: Jan Beulich; +Cc: linux-kernel

>May I ask how one is supposed to write a non-static function and let the
>compiler decide whether it is worth inlining? Since all of 'inline',
>'__inline', and '__inline__' get __attribute__((always_inline))
>attached, I can't see how I would currently do this. Wouldn't it make
>sense to leave at least one of the three with its original meaning?

The only way I see ATM is to:
#undef inline

Then inline and __attribute__((always_inline)) are "independent" again.



Jan Engelhardt
-- 
Gesellschaft für Wissenschaftliche Datenverarbeitung
Am Fassberg, 37077 Göttingen, www.gwdg.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-11-20 10:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-19 13:26 inline (and variants) function modifier Jan Beulich
2004-11-20 10:02 ` Jan Engelhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome