Re: INVARIANTS in sys/sys/sx.h

From: Erik Trulsson <ertr1013_at_student.uu.se>
Date: Mon, 28 Aug 2006 16:43:58 +0200
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?
> 





-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013_at_student.uu.se
Received on Mon Aug 28 2006 - 12:44:01 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:59 UTC