On Thu, 2011-03-17 at 18:02 +0100, Eric Dumazet wrote: > Le jeudi 17 mars 2011 à 12:55 -0400, Steven Rostedt a écrit : > > Here, test this patch. I'm in the process of committing it now. > > It will be two patches, one for the WARN_ON_SMP() change, the other for > > the futex change. > > > > -- Steve > > > > diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h > > index c2c9ba0..25f1e9e 100644 > > --- a/include/asm-generic/bug.h > > +++ b/include/asm-generic/bug.h > > @@ -168,7 +168,7 @@ extern void warn_slowpath_null(const char *file, const > > int line); > > #ifdef CONFIG_SMP > > # define WARN_ON_SMP(x) WARN_ON(x) > > #else > > -# define WARN_ON_SMP(x) do { } while (0) > > +# define WARN_ON_SMP(x) ({0;}) > > #endif > > > > You meant : > > # define WARN_ON_SMP(x) ({x;}) > > or > > # define WARN_ON_SMP(x) do { } while (x, 0) > > ? >
Does if (do { } while (x, 0)) work? And no, on SMP it should always return false. The point is, the warning is only valid if we are on an SMP box, this is useful for spin_locks() if (WARN_ON_SMP(!spin_is_locked(lock))) fail(); We don't want to fail. That spin_is_locked(lock) on !SMP returns 0 every time. -- Steve ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel