Re: regarding synchronization code

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

 



Hi Sri,

On Fri, Sep 24, 2010 at 3:56 PM, Sri Ram Vemulpali wrote:
> Hi all,
>
>  I am encountering alot macros in the code. I did not understand what
> those macro means.
>
>  Can anyone explain them and the use of them putting them like that.
>
>   "unlikely"

This has to do with branch prediction. If the architecture that you're
building for supports branch prediction then this provides a hint to
say that the following test is unlikely to pass, so the branch
prediction will be setup to take the likely path.

>   "always_inline"  -- defined at the signature of the function.

Exactly what it says - always make the function an inline function.
The inline keyword is normally just a hint or suggestion to the
compiler, whereas the always_inline says that the function should
always be inlined, even if optimizations to perform function inlining
is disabled.
<http://gcc.gnu.org/onlinedocs/gcc-4.0.4/gcc/Function-Attributes.html>

>   "inline" -- I know inline keyword in compiler is used to place the
> code in to the caller function at the time of compiler, but why
> declared as macro

There are some CONFIG options which allow inline behaviour to be tweaked:
<http://cateee.net/lkddb/web-lkddb/OPTIMIZE_INLINING.html>

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux