diff options
author | 2016-09-15 02:00:16 +0000 | |
---|---|---|
committer | 2016-09-15 02:00:16 +0000 | |
commit | 1378bae268607a02c6648b2f5af62a452cd7f812 (patch) | |
tree | df8d0622b88e5eab156f9883c45fbd54dc90938b /sys/kern/kern_srp.c | |
parent | bring back r1.53 (diff) | |
download | wireguard-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_srp.c')
-rw-r--r-- | sys/kern/kern_srp.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/kern/kern_srp.c b/sys/kern/kern_srp.c index b43b42ae6e4..6900fd30557 100644 --- a/sys/kern/kern_srp.c +++ b/sys/kern/kern_srp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_srp.c,v 1.10 2016/06/01 03:34:32 dlg Exp $ */ +/* $OpenBSD: kern_srp.c,v 1.11 2016/09/15 02:00:16 dlg Exp $ */ /* * Copyright (c) 2014 Jonathan Matthew <jmatthew@openbsd.org> @@ -106,11 +106,8 @@ struct pool srp_gc_ctx_pool; void srp_startup(void) { - pool_init(&srp_gc_ctx_pool, sizeof(struct srp_gc_ctx), 0, 0, - PR_WAITOK, "srpgc", NULL); - - /* items are allocated in a process, but freed from a timeout */ - pool_setipl(&srp_gc_ctx_pool, IPL_SOFTCLOCK); + pool_init(&srp_gc_ctx_pool, sizeof(struct srp_gc_ctx), 0, + IPL_SOFTCLOCK, PR_WAITOK, "srpgc", NULL); } int |