Make this compile with POOL_DIAGNOSTIC, and add a POOL_LOGSIZE option.

Defopt these.
This commit is contained in:
thorpej 1998-12-27 21:13:43 +00:00
parent f079e8d39c
commit e1315a2447
2 changed files with 14 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: subr_pool.c,v 1.16 1998/12/16 04:28:23 briggs Exp $ */
/* $NetBSD: subr_pool.c,v 1.17 1998/12/27 21:13:43 thorpej Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -125,7 +125,11 @@ struct pool_log {
};
/* Number of entries in pool log buffers */
int pool_logsize = 10;
#ifndef POOL_LOGSIZE
#define POOL_LOGSIZE 10
#endif
int pool_logsize = POOL_LOGSIZE;
static void pr_log __P((struct pool *, void *, int, const char *, long));
static void pr_printlog __P((struct pool *));
@ -989,7 +993,7 @@ pool_drain(arg)
}
#ifdef DEBUG
#if defined(POOL_DIAGNOSTIC) || defined(DEBUG)
/*
* Diagnostic helpers.
*/
@ -1080,4 +1084,4 @@ out:
simple_unlock(&pp->pr_lock);
return (r);
}
#endif
#endif /* POOL_DIAGNOSTIC || DEBUG */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pool.h,v 1.11 1998/12/16 04:28:23 briggs Exp $ */
/* $NetBSD: pool.h,v 1.12 1998/12/27 21:13:43 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -39,6 +39,10 @@
#ifndef _SYS_POOL_H_
#define _SYS_POOL_H_
#if defined(_KERNEL) && !defined(_LKM)
#include "opt_pool.h"
#endif
#include <sys/lock.h>
#include <sys/queue.h>
@ -138,7 +142,7 @@ void pool_sethiwat __P((pool_handle_t, int));
void pool_print __P((pool_handle_t, char *));
void pool_reclaim __P((pool_handle_t));
void pool_drain __P((void *));
#ifdef DEBUG
#if defined(POOL_DIAGNOSTIC) || defined(DEBUG)
void pool_print __P((struct pool *, char *));
int pool_chk __P((struct pool *, char *));
#endif