lkml.org 
[lkml]   [2004]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [announce] [patch] Voluntary Kernel Preemption Patch
    On Sat, Jul 10, 2004 at 01:50:17AM +0200, Andrea Arcangeli wrote:
    > agreed. might_sleep() just like BUG() can be defined to noop.

    BTW, this reminded me a related topic that I can't recall being ever
    mentioned on l-k: BUG_ON can also be optimized away. So people should be
    careful not to do write this:

    BUG_ON(test_and_set_bit(p))

    but to write this instead:

    if (unlikely(test_and_set_bit(p))
    BUG()

    (in short the check inside a BUG_ON must be strictly read-only since
    it's not guaranteed to be computed)
    -
    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 14:04    [W:0.029 / U:0.216 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site