summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_resource.c
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2016-09-15 02:00:16 +0000
committerdlg <dlg@openbsd.org>2016-09-15 02:00:16 +0000
commit1378bae268607a02c6648b2f5af62a452cd7f812 (patch)
treedf8d0622b88e5eab156f9883c45fbd54dc90938b /sys/kern/kern_resource.c
parentbring back r1.53 (diff)
downloadwireguard-openbsd-1378bae268607a02c6648b2f5af62a452cd7f812.tar.xz
wireguard-openbsd-1378bae268607a02c6648b2f5af62a452cd7f812.zip
all pools have their ipl set via pool_setipl, so fold it into pool_init.
the ioff argument to pool_init() is unused and has been for many years, so this replaces it with an ipl argument. because the ipl will be set on init we no longer need pool_setipl. most of these changes have been done with coccinelle using the spatch below. cocci sucks at formatting code though, so i fixed that by hand. the manpage and subr_pool.c bits i did myself. ok tedu@ jmatthew@ @ipl@ expression pp; expression ipl; expression s, a, o, f, m, p; @@ -pool_init(pp, s, a, o, f, m, p); -pool_setipl(pp, ipl); +pool_init(pp, s, a, ipl, f, m, p);
Diffstat (limited to 'sys/kern/kern_resource.c')
-rw-r--r--sys/kern/kern_resource.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c
index 74a7cc73c34..b1601596aba 100644
--- a/sys/kern/kern_resource.c
+++ b/sys/kern/kern_resource.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_resource.c,v 1.56 2016/08/25 00:00:02 dlg Exp $ */
+/* $OpenBSD: kern_resource.c,v 1.57 2016/09/15 02:00:16 dlg Exp $ */
/* $NetBSD: kern_resource.c,v 1.38 1996/10/23 07:19:38 matthias Exp $ */
/*-
@@ -506,9 +506,8 @@ limcopy(struct plimit *lim)
static int initialized;
if (!initialized) {
- pool_init(&plimit_pool, sizeof(struct plimit), 0, 0, PR_WAITOK,
- "plimitpl", NULL);
- pool_setipl(&plimit_pool, IPL_NONE);
+ pool_init(&plimit_pool, sizeof(struct plimit), 0, IPL_NONE,
+ PR_WAITOK, "plimitpl", NULL);
initialized = 1;
}