lkml.org 
[lkml]   [2006]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 07/61] lock validator: better lock debugging

* Andrew Morton <akpm@osdl.org> wrote:

> > +#define DEBUG_WARN_ON(c) \
> > +({ \
> > + int __ret = 0; \
> > + \
> > + if (unlikely(c)) { \
> > + if (debug_locks_off()) \
> > + WARN_ON(1); \
> > + __ret = 1; \
> > + } \
> > + __ret; \
> > +})
>
> Either the name of this thing is too generic, or we _make_ it generic,
> in which case it's in the wrong header file.

this op is only intended to be used only by the lock debugging
infrastructure. So it should be renamed - but i fail to find a good name
for it. (it's used quite frequently within the lock debugging code, at
60+ places) Maybe INTERNAL_WARN_ON()? [that makes it sound special
enough.] DEBUG_LOCKS_WARN_ON() might work too.

> > +#ifdef CONFIG_SMP
> > +# define SMP_DEBUG_WARN_ON(c) DEBUG_WARN_ON(c)
> > +#else
> > +# define SMP_DEBUG_WARN_ON(c) do { } while (0)
> > +#endif
>
> Probably ditto.

agreed.

Ingo
-
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/

\
 
 \ /
  Last update: 2006-06-23 12:32    [W:0.298 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site