Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Sep 2000 14:15:42 -0700
From:      Don Lewis <Don.Lewis@tsc.tdk.com>
To:        Jeroen Ruigrok/Asmodai <asmodai@wxs.nl>, Don Lewis <Don.Lewis@tsc.tdk.com>
Cc:        Bruce Evans <bde@zeta.org.au>, Robert Watson <rwatson@FreeBSD.ORG>, freebsd-arch@FreeBSD.ORG
Subject:   unified assert style (was: Re: Request for review: restructuring of per-uid resource limits)
Message-ID:  <200009062115.OAA29563@salsa.gv.tsc.tdk.com>
In-Reply-To: <20000906214451.C58347@daemon.ninth-circle.org>
References:  <Pine.BSF.4.21.0009060505100.25034-100000@besplex.bde.org> <200009052216.PAA25991@salsa.gv.tsc.tdk.com> <20000906214451.C58347@daemon.ninth-circle.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009062115.OAA29563>