xfs
[Top] [All Lists]

Re: XFS_WANT_FUNCS

To: linux-xfs@xxxxxxxxxxx
Subject: Re: XFS_WANT_FUNCS
From: Glen Overby <overby@xxxxxxx>
Date: Sun, 11 Jan 2004 10:21:43 -0600 (CST)
Cc: ak@xxxxxx
In-reply-to: message from Andi Kleen sent 11 January 2004
References: <20040111114500.GA4508@averell>
Sender: linux-xfs-bounce@xxxxxxxxxxx
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


<Prev in Thread] Current Thread [Next in Thread>