From owner-freebsd-arch Wed Sep 6 14:16: 2 2000 Delivered-To: freebsd-arch@freebsd.org Received: from gatekeeper.tsc.tdk.com (gatekeeper.tsc.tdk.com [207.113.159.21]) by hub.freebsd.org (Postfix) with ESMTP id 6F1FB37B424; Wed, 6 Sep 2000 14:16:00 -0700 (PDT) Received: from imap.gv.tsc.tdk.com (imap.gv.tsc.tdk.com [192.168.241.198]) by gatekeeper.tsc.tdk.com (8.8.8/8.8.8) with ESMTP id OAA05972; Wed, 6 Sep 2000 14:15:44 -0700 (PDT) (envelope-from gdonl@tsc.tdk.com) Received: from salsa.gv.tsc.tdk.com (salsa.gv.tsc.tdk.com [192.168.241.194]) by imap.gv.tsc.tdk.com (8.9.3/8.9.3) with ESMTP id OAA29785; Wed, 6 Sep 2000 14:15:43 -0700 (PDT) (envelope-from Don.Lewis@tsc.tdk.com) Received: (from gdonl@localhost) by salsa.gv.tsc.tdk.com (8.8.5/8.8.5) id OAA29563; Wed, 6 Sep 2000 14:15:42 -0700 (PDT) From: Don Lewis Message-Id: <200009062115.OAA29563@salsa.gv.tsc.tdk.com> Date: Wed, 6 Sep 2000 14:15:42 -0700 In-Reply-To: <20000906214451.C58347@daemon.ninth-circle.org> References: <200009052216.PAA25991@salsa.gv.tsc.tdk.com> <20000906214451.C58347@daemon.ninth-circle.org> X-Mailer: Mail User's Shell (7.2.6 beta(5) 10/07/98) To: Jeroen Ruigrok/Asmodai , Don Lewis Subject: unified assert style (was: Re: Request for review: restructuring of per-uid resource limits) Cc: Bruce Evans , Robert Watson , freebsd-arch@FreeBSD.ORG Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sep 6, 9:44pm, Jeroen Ruigrok/Asmodai wrote: } Subject: Re: Request for review: restructuring of per-uid resource limits } -On [20000906 02:00], Don Lewis (Don.Lewis@tsc.tdk.com) wrote: } >On Sep 6, 5:11am, Bruce Evans wrote: } >} Perhaps there should be several levels of KASSERTs, with at } >} least one level where the sanity checks are not mandatory (like the } >} current default of INVARIANTS not defined). } > } >That sounds good to me. Having to change the sense of the test to } >convert between "if (...) panic" and KASSERT as well as the other } >syntax changes basically sucks. } } Look at the CONDSPLASSERT(9) manpage. } } It has different characteristics depending on a sysctl value. That's closer to what I had in mind (but it is only present in current). It also uses the spl level as one of its conditions. What I've got in mind is an assertion macro that would several parameters. The first would indicate whether the code would be conditional on INVARIANTS. The second parameter would be compared with a sysctl knob and the condition would only be checked if the sysctl value was greater than or equal to the parameter. The third parameter would be compared to another sysctl knob and an assertion failure would result in a panic if the sysctl value was greater than or equal to the parameter, otherwise the failure would only be logged. } It hope I understood what you two meant, otherwise excuse my intrusion. } :) You certainly did. Thanks for the pointer. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message