-/* $OpenBSD: subr_pool.c,v 1.138 2014/07/10 13:34:39 tedu Exp $ */
+/* $OpenBSD: subr_pool.c,v 1.139 2014/08/11 12:37:36 dlg Exp $ */
/* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */
/*-
return copyout(pp->pr_wchan, where, len);
case KERN_POOL_POOL:
memset(&pi, 0, sizeof(pi));
+
+ mtx_enter(&pp->pr_mtx);
pi.pr_size = pp->pr_size;
pi.pr_pgsize = pp->pr_alloc->pa_pagesz;
pi.pr_itemsperpage = pp->pr_itemsperpage;
pi.pr_npagefree = pp->pr_npagefree;
pi.pr_hiwat = pp->pr_hiwat;
pi.pr_nidle = pp->pr_nidle;
+ mtx_leave(&pp->pr_mtx);
+
return copyout(&pi, where, buflen);
}
/* NOTREACHED */