Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Oct 2001 13:03:02 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org
Subject:   RE: cvs commit: src/sys/sys _lock.h lock.h mutex.h
Message-ID:  <XFMail.011019130302.jhb@FreeBSD.org>
In-Reply-To: <200110191928.f9JJSIe50288@freefall.freebsd.org>

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

On 19-Oct-01 John Baldwin wrote:
> jhb         2001/10/19 12:28:18 PDT
> 
>   Modified files:
>     sys/sys              _lock.h lock.h mutex.h 
>   Log:
>   - Move the definition of LOCK_DEBUG back to sys/lock.h from sys/_lock.h.
>   - Change LOCK_DEBUG so that it is always on if KTR is compiled in
>     regardless of the state of KTR_COMPILE.  This means that we no longer
>     need to include sys/ktr.h before sys/lock.h to ensure a valid setting
>     for LOCK_DEBUG.
>   - Change the use of LOCK_DEBUG so that it is now always defined and its
>     value is used instead of merely its definition.  That is, instead of
>     #ifdef LOCK_DEBUG, code should now use #if LOCK_DEBUG > 0.
>   - Use this latest to #error out in sys/mutex.h if sys/lock.h isn't
>     included before sys/mutex.h to ensure that the proper versions of the
>     mutex operations are used.
>   - As a result of (2) sys/mutex.h no longer includes sys/ktr.h in the
>     KERNEL case.
>   
>   Requested by:       bde (1)

I've tested this (it can cause build but nto runtime failures) on x86, alpha,
and ia64.  I don't have means to test this on ppc or sparc64 atm, but it will
give you a nice #error about needing sys/lock.h before sys/mutex.h if you hit
breakage while compiling.  I hope using #error isn't a problem.  (I think I
heard that #error is standard but #warning is a GCC'ism.)

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"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.011019130302.jhb>