Mark the rt_timer callout MPSAFE and move the first reset a few lines
down so the the workqueue is properly prepared (the latter being more a cosmetical change). Ok: ozaki-r@
This commit is contained in:
parent
8759207c83
commit
17f84ba4fd
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: route.c,v 1.171 2016/07/13 09:56:20 hannken Exp $ */
|
/* $NetBSD: route.c,v 1.172 2016/07/15 09:25:47 martin Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
|
* Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
|
||||||
@ -96,7 +96,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.171 2016/07/13 09:56:20 hannken Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.172 2016/07/15 09:25:47 martin Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#ifdef RTFLUSH_DEBUG
|
#ifdef RTFLUSH_DEBUG
|
||||||
@ -1160,12 +1160,12 @@ rt_timer_init(void)
|
|||||||
assert(rt_init_done == 0);
|
assert(rt_init_done == 0);
|
||||||
|
|
||||||
LIST_INIT(&rttimer_queue_head);
|
LIST_INIT(&rttimer_queue_head);
|
||||||
callout_init(&rt_timer_ch, 0);
|
callout_init(&rt_timer_ch, CALLOUT_MPSAFE);
|
||||||
callout_reset(&rt_timer_ch, hz, rt_timer_timer, NULL);
|
|
||||||
error = workqueue_create(&rt_timer_wq, "rt_timer",
|
error = workqueue_create(&rt_timer_wq, "rt_timer",
|
||||||
rt_timer_work, NULL, PRI_SOFTNET, IPL_SOFTNET, WQ_MPSAFE);
|
rt_timer_work, NULL, PRI_SOFTNET, IPL_SOFTNET, WQ_MPSAFE);
|
||||||
if (error)
|
if (error)
|
||||||
panic("%s: workqueue_create failed (%d)\n", __func__, error);
|
panic("%s: workqueue_create failed (%d)\n", __func__, error);
|
||||||
|
callout_reset(&rt_timer_ch, hz, rt_timer_timer, NULL);
|
||||||
rt_init_done = 1;
|
rt_init_done = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user