aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/netinet/in_mcast.c9
-rw-r--r--sys/netinet6/in6_mcast.c9
2 files changed, 2 insertions, 16 deletions
diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c
index cf624e8a3157..99efb4bdb3e4 100644
--- a/sys/netinet/in_mcast.c
+++ b/sys/netinet/in_mcast.c
@@ -229,16 +229,9 @@ inm_is_ifp_detached(const struct in_multi *inm)
* dedicated thread to avoid deadlocks when draining inm_release tasks.
*/
TASKQUEUE_DEFINE_THREAD(inm_free);
-static struct task inm_free_task;
static struct in_multi_head inm_free_list = SLIST_HEAD_INITIALIZER();
static void inm_release_task(void *arg __unused, int pending __unused);
-
-static void
-inm_init(void *arg __unused)
-{
- TASK_INIT(&inm_free_task, 0, inm_release_task, NULL);
-}
-SYSINIT(inm_init, SI_SUB_TASKQ, SI_ORDER_ANY, inm_init, NULL);
+static struct task inm_free_task = TASK_INITIALIZER(0, inm_release_task, NULL);
void
inm_release_wait(void *arg __unused)
diff --git a/sys/netinet6/in6_mcast.c b/sys/netinet6/in6_mcast.c
index 2433dc2ee194..fde7e5dad165 100644
--- a/sys/netinet6/in6_mcast.c
+++ b/sys/netinet6/in6_mcast.c
@@ -516,16 +516,9 @@ in6m_release(struct in6_multi *inm)
* dedicated thread to avoid deadlocks when draining in6m_release tasks.
*/
TASKQUEUE_DEFINE_THREAD(in6m_free);
-static struct task in6m_free_task;
static struct in6_multi_head in6m_free_list = SLIST_HEAD_INITIALIZER();
static void in6m_release_task(void *arg __unused, int pending __unused);
-
-static void
-in6m_init(void *arg __unused)
-{
- TASK_INIT(&in6m_free_task, 0, in6m_release_task, NULL);
-}
-SYSINIT(in6m_init, SI_SUB_TASKQ, SI_ORDER_ANY, in6m_init, NULL);
+static struct task in6m_free_task = TASK_INITIALIZER(0, in6m_release_task, NULL);
void
in6m_release_list_deferred(struct in6_multi_head *inmh)