Messages in this thread | | | From | Linus Torvalds <> | Date | Tue, 24 May 2011 12:03:16 -0700 | Subject | Re: [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/
| |