Re: what is static inline void tvec_base

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 28, 2010 at 1:05 PM, James Bond <jamesbond.2k.g@xxxxxxxxx> wrote:
>
>
> On Sat, Aug 28, 2010 at 5:39 PM, Greg Freemyer <greg.freemyer@xxxxxxxxx>
> wrote:
>>
>> http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Inline.html
>>
>> note the last sentence of that doc
>>
>>               GCC does not inline any functions when not optimizing
>> unless you specify the `always_inline' attribute for the function,
>> like this:
>>
>> Thus the inline keyword is always ignored by gcc if your not compiling
>> with optimization enabled.
>>
> Ok I read that link
> "GCC does not inline any functions when not optimizing unless you specify
> the `always_inline' attribute for the function, like this:"
> you mean to say the use of word static inline in  functions written in
> timer.c  will make sense only when gcc is used with optimization enabled.
> So if this is the case then when some one is compiling his linux kernel is
> by default optimization enabled in that or Makefiles take care of this.
> What is the default behavior of gcc?
> Is it always in optimized mode or we have to do it manually?

The standard makefiles that come with the kernel optimize.  You would
only want to not optimize if you're troubleshooting and want to see if
a compiler optimization is actually causing a bug.  (It has more that
once, so it really does come up.)

Back to your inline question.

Have you come across the linux source browser a
http://lxr.linux.no/#linux+v2.6.35/ yet.

It is great for researching questions about the source.

I just found this reference for you via that resource:

http://lxr.linux.no/#linux+v2.6.35/Documentation/CodingStyle#L692

You can see they complain about over use of inline, especially since
gcc will find the obvious cases on its own.

Greg

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux