From owner-cvs-all Fri Oct 19 13: 3:39 2001 Delivered-To: cvs-all@freebsd.org Received: from femail39.sdc1.sfba.home.com (femail39.sdc1.sfba.home.com [24.254.60.33]) by hub.freebsd.org (Postfix) with ESMTP id D3D6637B407; Fri, 19 Oct 2001 13:03:08 -0700 (PDT) Received: from laptop.baldwin.cx ([24.2.39.156]) by femail39.sdc1.sfba.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with ESMTP id <20011019200308.NGFA4194.femail39.sdc1.sfba.home.com@laptop.baldwin.cx>; Fri, 19 Oct 2001 13:03:08 -0700 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200110191928.f9JJSIe50288@freefall.freebsd.org> Date: Fri, 19 Oct 2001 13:03:02 -0700 (PDT) From: John Baldwin To: John Baldwin Subject: RE: cvs commit: src/sys/sys _lock.h lock.h mutex.h Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 -- 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