title: What's the point of "unlikely()"?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/109710/likely-unlikely-macros-in-the-linux-kernel">likely/unlikely macros in the Linux kernel</a>  </p>
  </blockquote>
  
  
  
  <p>In the Linux kernel, I came across the line in <a href="http://lxr.linux.no/linux+v3.6.9/include/linux/sched.h#L2283" rel="nofollow noreferrer">./linux/include/shed.h</a>:</p>
  
  <pre><code> if (unlikely(atomic_dec_and_test(&amp;mm-&gt;mm_count)))
  </code></pre>
  
  <p>What exactly is the point of unlikely?  I've found a definition of it in <a href="http://lxr.linux.no/linux+v3.6.9/arch/x86/tools/insn_sanity.c#L31" rel="nofollow noreferrer">.arch/x86/tools/insn_sanity.c</a>, but it's just:</p>
  
  <pre><code>#define unlikely(cond) (cond)
  </code></pre>
  
  <p>To me there doesn't seem to be a point to using <code>unlikely()</code> at all.  What is the intended purpose of <code>unlikely</code>?</p>