summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2012-12-24 19:43:12 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2012-12-24 19:43:12 +0000
commit486d2f917c8ab55c62a9f3165051749b0a0f499a (patch)
tree48f82c52822fce569db73810e2fed06d6e38f665 /sys
parentc2f3be329a4cfc81d31e597384c26b2992c2c3e8 (diff)
Fix compilation with POOL_DEBUG but !DDB
ok jsing@ krw@ mikeb@
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/subr_pool.c9
-rw-r--r--sys/sys/pool.h3
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/kern/subr_pool.c b/sys/kern/subr_pool.c
index 5749b5ff9a0..64a3156bcb5 100644
--- a/sys/kern/subr_pool.c
+++ b/sys/kern/subr_pool.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_pool.c,v 1.111 2011/11/23 02:05:17 dlg Exp $ */
+/* $OpenBSD: subr_pool.c,v 1.112 2012/12/24 19:43:11 guenther Exp $ */
/* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */
/*-
@@ -113,7 +113,8 @@ void *pool_do_get(struct pool *, int);
void pool_do_put(struct pool *, void *);
void pr_rmpage(struct pool *, struct pool_item_header *,
struct pool_pagelist *);
-int pool_chk_page(struct pool *, struct pool_item_header *, int);
+int pool_chk_page(struct pool *, struct pool_item_header *, int);
+int pool_chk(struct pool *);
struct pool_item_header *pool_alloc_item_header(struct pool *, caddr_t , int);
void *pool_allocator_alloc(struct pool *, int, int *);
@@ -1266,7 +1267,9 @@ db_show_all_pools(db_expr_t expr, int haddr, db_expr_t count, char *modif)
pool_chk(pp);
}
}
+#endif /* DDB */
+#if defined(POOL_DEBUG) || defined(DDB)
int
pool_chk_page(struct pool *pp, struct pool_item_header *ph, int expected)
{
@@ -1360,7 +1363,9 @@ pool_chk(struct pool *pp)
return (r);
}
+#endif /* defined(POOL_DEBUG) || defined(DDB) */
+#ifdef DDB
void
pool_walk(struct pool *pp, int full, int (*pr)(const char *, ...),
void (*func)(void *, int, int (*)(const char *, ...)))
diff --git a/sys/sys/pool.h b/sys/sys/pool.h
index 9e0a1f7a260..f78ddb03ecc 100644
--- a/sys/sys/pool.h
+++ b/sys/sys/pool.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pool.h,v 1.41 2011/07/05 16:36:15 tedu Exp $ */
+/* $OpenBSD: pool.h,v 1.42 2012/12/24 19:43:11 guenther Exp $ */
/* $NetBSD: pool.h,v 1.27 2001/06/06 22:00:17 rafal Exp $ */
/*-
@@ -166,7 +166,6 @@ int pool_prime(struct pool *, int);
*/
void pool_printit(struct pool *, const char *,
int (*)(const char *, ...));
-int pool_chk(struct pool *);
void pool_walk(struct pool *, int, int (*)(const char *, ...),
void (*)(void *, int, int (*)(const char *, ...)));
#endif