lkml.org 
[lkml]   [2012]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [ 57/72] genirq: Unmask oneshot irqs when thread was not woken
    On Tue, Mar 6, 2012 at 1:40 PM, Linus Torvalds
    <torvalds@linux-foundation.org> wrote:
    >
    > (*) "1 << ffz(a)" can be written as
    >
    >   a = ~a;        /* Turn the zero bits into 1 bits */
    >   a &= -a;      /* .. and find the first one. */
    >
    > without ever doing any insane bit scanning.

    Alternatively, wite it directly as "(a+1) &~a", which is the same
    expression just written differently (due to "-a == ~a+1")

    Yeah, I've been playing too much with the bitwise optimizations of the
    dentry cache name comparisons lately.

    Linus
    --
    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: 2012-03-06 22:49    [W:0.038 / U:32.444 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site