summaryrefslogtreecommitdiffstats
path: root/sys/net/route.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/net/route.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/net/route.c')
-rw-r--r--sys/net/route.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index 1e0696ba950..d15074e92cb 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.328 2016/09/13 08:11:39 mpi Exp $ */
+/* $OpenBSD: route.c,v 1.329 2016/09/15 02:00:18 dlg Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -191,9 +191,8 @@ TAILQ_HEAD(rt_labels, rt_label) rt_labels = TAILQ_HEAD_INITIALIZER(rt_labels);
void
route_init(void)
{
- pool_init(&rtentry_pool, sizeof(struct rtentry), 0, 0, 0, "rtentry",
- NULL);
- pool_setipl(&rtentry_pool, IPL_SOFTNET);
+ pool_init(&rtentry_pool, sizeof(struct rtentry), 0, IPL_SOFTNET, 0,
+ "rtentry", NULL);
while (rt_hashjitter == 0)
rt_hashjitter = arc4random();
@@ -1462,9 +1461,8 @@ rt_timer_init(void)
if (rt_init_done)
panic("rt_timer_init: already initialized");
- pool_init(&rttimer_pool, sizeof(struct rttimer), 0, 0, 0, "rttmr",
- NULL);
- pool_setipl(&rttimer_pool, IPL_SOFTNET);
+ pool_init(&rttimer_pool, sizeof(struct rttimer), 0, IPL_SOFTNET, 0,
+ "rttmr", NULL);
LIST_INIT(&rttimer_queue_head);
timeout_set(&rt_timer_timeout, rt_timer_timer, &rt_timer_timeout);