[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1300387417.16880.399.camel@gandalf.stny.rr.com>
Date: Thu, 17 Mar 2011 14:43:37 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>,
richard -rw- weinberger <richard.weinberger@...il.com>,
laijs@...fujitsu.com, LKML <linux-kernel@...r.kernel.org>,
user-mode-linux-devel@...ts.sourceforge.net, dvhart@...ux.intel.com
Subject: Re: um: WARNING: at kernel/futex.c:786 __unqueue_futex
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists