lkml.org 
[lkml]   [2011]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: um: WARNING: at kernel/futex.c:786 __unqueue_futex
From
Date
On Thu, 2011-03-17 at 19:38 +0100, Eric Dumazet wrote:
>
>
> My point was that WARN_ON(X) always evaluates X once
>
> And apparently, WARN_ON_SMP(X) doesnt evaluates X iF !SMP
>
> This should be documented, or fixed ;)

My new patch has it documented. I even explain when to use the _SMP()
version, which is mainly for !spin_is_locked() as spin_is_locked()
always returns false, and !0 will trigger the warning.

It can also be used to test values that only exist in SMP.

struct foo {
[...]
#ifdef CONFIG_SMP
int bar;
#endif
};


WARN_ON_SMP(zoo->bar);

We don't want that zoo->bar even evaluated for that case.

-- Steve





\
 
 \ /
  Last update: 2011-03-17 19:45    [W:0.111 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site