On January 11, Andi Kleen wrote:
> I found many of the XFS include files hard to read because
> of XFS_WANTS_FUNCS. What use is that define? Is it still used
> for anything? Would patches to remove it have a chance to be
> accepted?
When we build XFS kernels with the DEBUG define set, it turns those
macros into C functions (see xfs_macros.c). This is so stack traces
will show what macro a problem occurs inside of, and so breakpoints
can be set inside of macros.
While it's not something I've relied heavily on for fixing bugs, I
know it's been useful a time or two. I'm never enthusiastic about
losing debugging tools. I'm not bothered by ifdefs.
#ifdef XFS_WANT_FUNCS
Glen Overby
#else
#error can't grok input
#endif
|