lkml.org 
[lkml]   [2011]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 07/19] ptrace: use bit_waitqueue for TRAPPING instead of wait_chldexit
Hello, Linus.

On Tue, May 24, 2011 at 12:03:16PM -0700, Linus Torvalds wrote:
> #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.

Sure, but can you at least explain why you dislike it so much? This
is the only place bit position is needed and having two variants with
_BIT can be confusing (I did that more than once with workqueue code).
ilog2() could be, I don't know, unfamiliar, but what's so crappy about
it?

Thanks.

--
tejun


\
 
 \ /
  Last update: 2011-05-25 10:47    [W:0.068 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site