From owner-freebsd-current@FreeBSD.ORG Mon Aug 28 16:06:51 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5981E16A4DF for ; Mon, 28 Aug 2006 16:06:51 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5015A43D45 for ; Mon, 28 Aug 2006 16:06:49 +0000 (GMT) (envelope-from uspoerlein@gmail.com) Received: by wr-out-0506.google.com with SMTP id i21so295810wra for ; Mon, 28 Aug 2006 09:06:49 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to; b=OuNhWj8sz7HYiDx640VYcTWrQePSJSoo33H+PuFoMkFejaQSE0ST2TdDydMK2TnkWavsXfWtodqDLirw6P/zL1jH9OE8q3ZLi02N0QfRi452NyI8wjAU5AP+z++1wSa6U1E3IBx/sTpKRmRwx6jB4zgv62bVZW53hXaAJlcLzgo= Received: by 10.65.81.19 with SMTP id i19mr7077058qbl; Mon, 28 Aug 2006 09:06:47 -0700 (PDT) Received: from roadrunner.q.local ( [217.185.114.73]) by mx.gmail.com with ESMTP id f17sm4401726qba.2006.08.28.09.06.45; Mon, 28 Aug 2006 09:06:47 -0700 (PDT) Received: from roadrunner.q.local (localhost [127.0.0.1]) by roadrunner.q.local (8.13.6/8.13.6) with ESMTP id k7SG6MYW015288; Mon, 28 Aug 2006 18:06:25 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Received: (from q@localhost) by roadrunner.q.local (8.13.6/8.13.6/Submit) id k7SFktX6006254; Mon, 28 Aug 2006 17:46:55 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Date: Mon, 28 Aug 2006 17:46:55 +0200 From: Ulrich Spoerlein To: Jun Kuriyama , Current Message-ID: <20060828154655.GH1082@roadrunner.aventurien.local> Mail-Followup-To: Jun Kuriyama , Current References: <7m3bbhx6vc.wl%kuriyama@imgsrc.co.jp> <20060828144358.GA46108@owl.midgard.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060828144358.GA46108@owl.midgard.homeip.net> Cc: Subject: Re: INVARIANTS in sys/sys/sx.h X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Aug 2006 16:06:51 -0000 Erik Trulsson wrote: > On Mon, Aug 28, 2006 at 11:38:47PM +0900, Jun Kuriyama wrote: > > > > I found this when I compiled my kernel with INVARIANTS without > > INVARIANT_SUPPORT. > > It says in /usr/src/syc/conf/NOTES that INVARIANT_SUPPORT is a prerequisite > for INVARIANTS. I.e. having a kernel with INVARIANTS without > INVARIANT_SUPPORT is not expected to work. I once was bitten by this, since I forgot this in my kernel conf and wondered about build breakage in the ata subsystem. I read the part about kernel+module debugging in NOTES, but I truly wonder: is this used regularly by developers? There are only 7 files under /src that do "ifdef INVARIANT_SUPPORT", couldn't we just merge the too? List of affected files under /src: ./kern/kern_mutex.c:#ifdef INVARIANT_SUPPORT ./kern/kern_sx.c:#ifdef INVARIANT_SUPPORT ./kern/kern_sx.c:#endif /* INVARIANT_SUPPORT */ ./kern/subr_witness.c:#ifdef INVARIANT_SUPPORT ./kern/subr_witness.c:#endif /* INVARIANT_SUPPORT */ ./sys/filedesc.h:#ifdef INVARIANT_SUPPORT ./sys/lock.h:#if defined(KLD_MODULE) || defined(WITNESS) || defined(INVARIANTS) || defined(INVARIANT_SUPPORT) || defined(KTR) || defined(MUTEX_PROFILING) ./sys/mutex.h:#if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) ./sys/mutex.h: * The constants need to be defined for INVARIANT_SUPPORT infrastructure ./sys/mutex.h:#if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) ./sys/sx.h:#ifdef INVARIANT_SUPPORT ./sys/sx.h:#if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) As you can see, lock.h and mutex.h work with both names and sx.h only has one out of two places, where it actually matters. Ulrich Spoerlein PS: The color of this bikeshed is blue. This is not negotiable! -- A: Yes. >Q: Are you sure? > >A: Because it reverses the logical flow of conversation. > >>Q: Why is top posting frowned upon?