summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_zone.c
diff options
context:
space:
mode:
authoreivind <eivind@FreeBSD.org>1999-01-08 17:31:30 +0000
committereivind <eivind@FreeBSD.org>1999-01-08 17:31:30 +0000
commita8dc66f457be84eefbe16e70c901ceb11137ba65 (patch)
treee5747f527c552fa90334c779c047697b372582fb /sys/vm/vm_zone.c
parent1c69824749ed0aa6efce159d39ab3f17fc9e25f2 (diff)
downloadFreeBSD-src-a8dc66f457be84eefbe16e70c901ceb11137ba65.zip
FreeBSD-src-a8dc66f457be84eefbe16e70c901ceb11137ba65.tar.gz
Split DIAGNOSTIC -> DIAGNOSTIC, INVARIANTS, and INVARIANT_SUPPORT as
discussed on -hackers. Introduce 'KASSERT(assertion, ("panic message", args))' for simple check + panic. Reviewed by: msmith
Diffstat (limited to 'sys/vm/vm_zone.c')
-rw-r--r--sys/vm/vm_zone.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/vm/vm_zone.c b/sys/vm/vm_zone.c
index 3c52819..d90784e 100644
--- a/sys/vm/vm_zone.c
+++ b/sys/vm/vm_zone.c
@@ -11,7 +11,7 @@
* 2. Absolutely no warranty of function or purpose is made by the author
* John S. Dyson.
*
- * $Id: vm_zone.c,v 1.23 1998/10/31 17:21:31 peter Exp $
+ * $Id: vm_zone.c,v 1.24 1998/12/04 22:54:57 archie Exp $
*/
#include <sys/param.h>
@@ -194,7 +194,7 @@ zbootinit(vm_zone_t z, char *name, int size, void *item, int nitems)
z->zitems = NULL;
for (i = 0; i < nitems; i++) {
((void **) item)[0] = z->zitems;
-#if defined(DIAGNOSTIC)
+#if defined(INVARIANTS)
((void **) item)[1] = (void *) ZENTRY_FREE;
#endif
z->zitems = item;
@@ -357,7 +357,7 @@ _zget(vm_zone_t z)
nitems -= 1;
for (i = 0; i < nitems; i++) {
((void **) item)[0] = z->zitems;
-#if defined(DIAGNOSTIC)
+#if defined(INVARIANTS)
((void **) item)[1] = (void *) ZENTRY_FREE;
#endif
z->zitems = item;
@@ -367,7 +367,7 @@ _zget(vm_zone_t z)
} else if (z->zfreecnt > 0) {
item = z->zitems;
z->zitems = ((void **) item)[0];
-#if defined(DIAGNOSTIC)
+#if defined(INVARIANTS)
if (((void **) item)[1] != (void *) ZENTRY_FREE)
zerror(ZONE_ERROR_NOTFREE);
((void **) item)[1] = 0;
@@ -432,7 +432,7 @@ sysctl_vm_zone SYSCTL_HANDLER_ARGS
return (0);
}
-#if defined(DIAGNOSTIC)
+#if defined(INVARIANT_SUPPORT)
void
zerror(int error)
{
OpenPOWER on IntegriCloud