lkml.org 
[lkml]   [2002]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    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.

    cu
    Adrian


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

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