From owner-freebsd-current@FreeBSD.ORG Mon Aug 28 14:44:01 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 035FB16A4DE for ; Mon, 28 Aug 2006 14:44:01 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from pne-smtpout2-sn2.hy.skanova.net (pne-smtpout2-sn2.hy.skanova.net [81.228.8.164]) by mx1.FreeBSD.org (Postfix) with ESMTP id 89D9443D68 for ; Mon, 28 Aug 2006 14:44:00 +0000 (GMT) (envelope-from erikt@midgard.homeip.net) Received: from falcon.midgard.homeip.net (83.253.29.241) by pne-smtpout2-sn2.hy.skanova.net (7.2.075) id 44F2F2F7000050D8 for freebsd-current@FreeBSD.org; Mon, 28 Aug 2006 16:43:59 +0200 Received: (qmail 6605 invoked from network); 28 Aug 2006 16:43:58 +0200 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with SMTP; 28 Aug 2006 16:43:58 +0200 Received: (qmail 46121 invoked by uid 1001); 28 Aug 2006 16:43:58 +0200 Date: Mon, 28 Aug 2006 16:43:58 +0200 From: Erik Trulsson To: Jun Kuriyama Message-ID: <20060828144358.GA46108@owl.midgard.homeip.net> Mail-Followup-To: Jun Kuriyama , Current References: <7m3bbhx6vc.wl%kuriyama@imgsrc.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7m3bbhx6vc.wl%kuriyama@imgsrc.co.jp> User-Agent: Mutt/1.5.11 Cc: Current 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 14:44:01 -0000 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. > > In src/sys/sys/sx.h, _sx_assert() is defined in INVARIANT_SUPPORT, > > > #ifdef INVARIANT_SUPPORT > > void _sx_assert(struct sx *sx, int what, const char *file, int line); > > #endif > > but sx_assert() uses this function in INVARIANTS option. > > > #ifdef INVARIANTS > > #define sx_assert(sx, what) _sx_assert((sx), (what), LOCK_FILE, LOCK_LINE) > > #else > > #define sx_assert(sx, what) > > #endif > > Is this consistent? > -- Erik Trulsson ertr1013@student.uu.se