Re: can someone explain "inline" once and for all?

2007-01-19 Thread Adrian Bunk
On Fri, Jan 19, 2007 at 03:15:03PM -0200, Alexandre Oliva wrote: >... > That's still a long way ahead (the 4.3 development cycle has just > started), but it wouldn't hurt to start fixing incompatibilities > sooner rather than later, and coming up with a clean and uniform set > of inline macros

Re: can someone explain "inline" once and for all?

2007-01-19 Thread Alexandre Oliva
On Jan 19, 2007, "Robert P. J. Day" <[EMAIL PROTECTED]> wrote: > first, there appear to be three possible ways of specifying an > inline routine in the kernel source: inline, __inline and __inline__ are equivalent as far as GCC is concerned, as you've already figured out. > i vaguely recall

Re: can someone explain "inline" once and for all?

2007-01-19 Thread Robert P. J. Day
On Fri, 19 Jan 2007, Adrian Bunk wrote: > With the current implementation in the kernel (and considering that > CONFIG_FORCED_INLINING was implemented in a way that it never had > any effect), __always_inline and inline are currently equivalent. yes, that option was implemented in a half-assed

Re: can someone explain "inline" once and for all?

2007-01-19 Thread Robert P. J. Day
On Fri, 19 Jan 2007, Adrian Bunk wrote: > On Fri, Jan 19, 2007 at 03:01:44PM +0200, Pekka Enberg wrote: > > On 1/19/07, Robert P. J. Day <[EMAIL PROTECTED]> wrote: > > >is there a simple explanation for how to *properly* define inline > > >routines in the kernel? and maybe this can be added to

Re: can someone explain "inline" once and for all?

2007-01-19 Thread Robert P. J. Day
On Fri, 19 Jan 2007, Andreas Schwab wrote: > "Robert P. J. Day" <[EMAIL PROTECTED]> writes: > > > but in terms of strict C89 compatibility, it would seem to be a bit > > late for that given: > > > > $ grep -r "static inline " . > > > > no? > > The kernel does not use strict C89, it uses GNUC89.

Re: can someone explain "inline" once and for all?

2007-01-19 Thread Adrian Bunk
On Fri, Jan 19, 2007 at 03:01:44PM +0200, Pekka Enberg wrote: > On 1/19/07, Robert P. J. Day <[EMAIL PROTECTED]> 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). >

Re: can someone explain "inline" once and for all?

2007-01-19 Thread Andreas Schwab
"Robert P. J. Day" <[EMAIL PROTECTED]> writes: > but in terms of strict C89 compatibility, it would seem to be a bit > late for that given: > > $ grep -r "static inline " . > > no? The kernel does not use strict C89, it uses GNUC89. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]

Re: can someone explain "inline" once and for all?

2007-01-19 Thread Robert P. J. Day
On Fri, 19 Jan 2007, Andreas Schwab wrote: > "Robert P. J. Day" <[EMAIL PROTECTED]> writes: > > > first, there appear to be three possible ways of specifying an > > inline routine in the kernel source: > > > > $ grep -r "static inline " . > > $ grep -r "static __inline__ " . > > $ grep -r

Re: can someone explain "inline" once and for all?

2007-01-19 Thread Andreas Schwab
"Robert P. J. Day" <[EMAIL PROTECTED]> writes: > first, there appear to be three possible ways of specifying an > inline routine in the kernel source: > > $ grep -r "static inline " . > $ grep -r "static __inline__ " . > $ grep -r "static __inline " . > > i vaguely recall that this has

Re: can someone explain "inline" once and for all?

2007-01-19 Thread Robert P. J. Day
On Fri, 19 Jan 2007, Pekka Enberg wrote: > On 1/19/07, Robert P. J. Day <[EMAIL PROTECTED]> 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

Re: can someone explain "inline" once and for all?

2007-01-19 Thread Pekka Enberg
On 1/19/07, Robert P. J. Day <[EMAIL PROTECTED]> 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

can someone explain "inline" once and for all?

2007-01-19 Thread Robert P. J. Day
apologies if this is an inappropriately trivial question but this has been bugging me for a while. what is the deal with "inline"? first, there appear to be three possible ways of specifying an inline routine in the kernel source: $ grep -r "static inline " . $ grep -r "static

can someone explain inline once and for all?

2007-01-19 Thread Robert P. J. Day
apologies if this is an inappropriately trivial question but this has been bugging me for a while. what is the deal with inline? first, there appear to be three possible ways of specifying an inline routine in the kernel source: $ grep -r static inline . $ grep -r static __inline__ .

Re: can someone explain inline once and for all?

2007-01-19 Thread Pekka Enberg
On 1/19/07, Robert P. J. Day [EMAIL PROTECTED] 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

Re: can someone explain inline once and for all?

2007-01-19 Thread Robert P. J. Day
On Fri, 19 Jan 2007, Pekka Enberg wrote: On 1/19/07, Robert P. J. Day [EMAIL PROTECTED] 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

Re: can someone explain inline once and for all?

2007-01-19 Thread Andreas Schwab
Robert P. J. Day [EMAIL PROTECTED] writes: first, there appear to be three possible ways of specifying an inline routine in the kernel source: $ grep -r static inline . $ grep -r static __inline__ . $ grep -r static __inline . i vaguely recall that this has something to do with

Re: can someone explain inline once and for all?

2007-01-19 Thread Robert P. J. Day
On Fri, 19 Jan 2007, Andreas Schwab wrote: Robert P. J. Day [EMAIL PROTECTED] writes: first, there appear to be three possible ways of specifying an inline routine in the kernel source: $ grep -r static inline . $ grep -r static __inline__ . $ grep -r static __inline .

Re: can someone explain inline once and for all?

2007-01-19 Thread Andreas Schwab
Robert P. J. Day [EMAIL PROTECTED] writes: but in terms of strict C89 compatibility, it would seem to be a bit late for that given: $ grep -r static inline . no? The kernel does not use strict C89, it uses GNUC89. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux

Re: can someone explain inline once and for all?

2007-01-19 Thread Adrian Bunk
On Fri, Jan 19, 2007 at 03:01:44PM +0200, Pekka Enberg wrote: On 1/19/07, Robert P. J. Day [EMAIL PROTECTED] 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

Re: can someone explain inline once and for all?

2007-01-19 Thread Robert P. J. Day
On Fri, 19 Jan 2007, Andreas Schwab wrote: Robert P. J. Day [EMAIL PROTECTED] writes: but in terms of strict C89 compatibility, it would seem to be a bit late for that given: $ grep -r static inline . no? The kernel does not use strict C89, it uses GNUC89. in that case, why

Re: can someone explain inline once and for all?

2007-01-19 Thread Robert P. J. Day
On Fri, 19 Jan 2007, Adrian Bunk wrote: On Fri, Jan 19, 2007 at 03:01:44PM +0200, Pekka Enberg wrote: On 1/19/07, Robert P. J. Day [EMAIL PROTECTED] wrote: is there a simple explanation for how to *properly* define inline routines in the kernel? and maybe this can be added to the

Re: can someone explain inline once and for all?

2007-01-19 Thread Robert P. J. Day
On Fri, 19 Jan 2007, Adrian Bunk wrote: With the current implementation in the kernel (and considering that CONFIG_FORCED_INLINING was implemented in a way that it never had any effect), __always_inline and inline are currently equivalent. yes, that option was implemented in a half-assed sort

Re: can someone explain inline once and for all?

2007-01-19 Thread Alexandre Oliva
On Jan 19, 2007, Robert P. J. Day [EMAIL PROTECTED] wrote: first, there appear to be three possible ways of specifying an inline routine in the kernel source: inline, __inline and __inline__ are equivalent as far as GCC is concerned, as you've already figured out. i vaguely recall that

Re: can someone explain inline once and for all?

2007-01-19 Thread Adrian Bunk
On Fri, Jan 19, 2007 at 03:15:03PM -0200, Alexandre Oliva wrote: ... That's still a long way ahead (the 4.3 development cycle has just started), but it wouldn't hurt to start fixing incompatibilities sooner rather than later, and coming up with a clean and uniform set of inline macros that