Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Oct 2000 22:06:14 -0700 (MST)
From:      <janb@cs.utep.edu>
To:        Boris Popov <bp@butya.kz>
Cc:        Eivind Eklund <eivind@FreeBSD.ORG>, current@FreeBSD.ORG
Subject:   Re: INVARIANTS and -current
Message-ID:  <Pine.GSO.4.05.10010312205490.14609-100000@gecko>
In-Reply-To: <Pine.BSF.4.10.10011011035110.22068-100000@lion.butya.kz>

next in thread | previous in thread | raw e-mail | index | archive | help
Could someone give a quick explanation what INVARIANTS does?

JAn

On Wed, 1 Nov 2000, Boris Popov wrote:

> On Tue, 31 Oct 2000, Eivind Eklund wrote:
> 
> > I want to enable INVARIANTS by default in -current.  This result in some
> > slowdown, but it also makes it more likely that we'll find bugs quickly.
> > People that want to run -current should know enough to disable it if it is
> > in the way, anyway.
> > 
> > Well-reasoned objections welcome.
> 
> 	Yes, running kernel with INVARIANTS is a very good idea (in fact,
> my -current setup runs it for over a year now). But this option will
> produce inconsistent data structures in the kernel and modules (just like
> with SMP case). While it is recommended to avoid modules on -current - I'm
> don't agree with this statement because many people use them.
> 
> 	In any way, fix for this is very simple (it assumes that
> INVARIANTS defined somewhere in the make.conf or sys.mk):
> 
> Index: conf/kmod.mk
> ===================================================================
> RCS file: /home/ncvs/src/sys/conf/kmod.mk,v
> retrieving revision 1.83
> diff -u -r1.83 kmod.mk
> --- conf/kmod.mk	2000/09/05 22:37:46	1.83
> +++ conf/kmod.mk	2000/09/30 05:55:55
> @@ -90,6 +90,10 @@
>  CFLAGS+=	${COPTS} -D_KERNEL ${CWARNFLAGS}
>  CFLAGS+=	-DKLD_MODULE
>  
> +.if defined(INVARIANTS)
> +CFLAGS+=	-DINVARIANTS
> +.endif
> +
>  # Don't use any standard or source-relative include directories.
>  # Since -nostdinc will annull any previous -I paths, we repeat all
>  # such paths after -nostdinc.  It doesn't seem to be possible to
> 
> --
> Boris Popov
> http://www.butya.kz/~bp/
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-current" in the body of the message
> 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.05.10010312205490.14609-100000>