Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Jan 2003 12:42:45 -0500 (EST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Nate Lawson <nate@root.org>
Cc:        cvs-committers@freebsd.org, cvs-all@freebsd.org, "Alan L. Cox" <alc@imimic.com>
Subject:   Re: cvs commit: src/sys/vm vm_map.c vm_map.h
Message-ID:  <XFMail.20030102124245.jhb@FreeBSD.org>
In-Reply-To: <Pine.BSF.4.21.0212311346280.90438-100000@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 31-Dec-2002 Nate Lawson wrote:
> On Tue, 31 Dec 2002, Alan L. Cox wrote:
>> Nate Lawson wrote:
>> > Please use the non-underscore, exported mtx_* routines.  The macros expand
>> > to the same thing unless you're doing something strange w/ file and line
>> > (but I don't see that in your patch).
>> 
>> Yes, they expand to rather useless information: line X of _vm_map_lock. 
>> As I've written it, any messages will report the call site of
>> _vm_map_lock, which is what we want to know.
> 
> Thanks for correcting me.  Any idea why the non-underscore funcs can't use
> a more useful value like __LINE__?

They do use __LINE__:

#define mtx_lock_flags(m, opts)                                         \
        _mtx_lock_flags((m), (opts), LOCK_FILE, LOCK_LINE)

and in sys/lock.h:

#if LOCK_DEBUG > 0
#define LOCK_FILE       __FILE__
#define LOCK_LINE       __LINE__
#else
#define LOCK_FILE       NULL
#define LOCK_LINE       0
#endif

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030102124245.jhb>