lkml.org 
[lkml]   [2011]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH 07/19] ptrace: use bit_waitqueue for TRAPPING instead of wait_chldexit
    On Tue, May 24, 2011 at 11:37 AM, Tejun Heo <tj@kernel.org> wrote:
    >
    > +               wake_up_bit(&task->jobctl, ilog2(JOBCTL_TRAPPING));

    Why do people do this *SHIT*?

    Stop it.

    If you need the bit number, then define the damn thing in terms of bit
    numbers! Do

    #define JOBCTL_TRAPPING_BIT xxx
    #define JOBCTL_TRAPPING (1u << JOBCTL_TRAPPING_BIT)

    but never ever do that stupid ilog2() thing. Every time I see it I go
    "ok, that's just total crap".

    Don't do it.

    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: 2011-05-24 21:07    [W:0.022 / U:0.616 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site