[lkml]   [2002]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: likely/unlikely
    On Wed, 16 Jan 2002, Craig Christophel wrote:

    > > likely/unlikely set the branch prediction values to 99% or 1%
    > So all of the BUG() routines in the kernel would benifit greatly from this.

    In the 2.5 kernels this is done when you use the BUG_ON macro that is
    defined as follows:

    #define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)

    BTW: Note that likely/unlikely doesn't has any effect for most of us
    because __builtin_expect is only available in gcc >= 2.96.

    > Craig.


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:23    [W:0.020 / U:29.176 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site