Module Name:    src
Committed By:   martin
Date:           Fri Jul 15 09:25:47 UTC 2016

Modified Files:
        src/sys/net: route.c

Log Message:
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@


To generate a diff of this commit:
cvs rdiff -u -r1.171 -r1.172 src/sys/net/route.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/route.c
diff -u src/sys/net/route.c:1.171 src/sys/net/route.c:1.172
--- src/sys/net/route.c:1.171	Wed Jul 13 09:56:20 2016
+++ src/sys/net/route.c	Fri Jul 15 09:25:47 2016
@@ -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.
@@ -96,7 +96,7 @@
 #endif
 
 #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>
 #ifdef RTFLUSH_DEBUG
@@ -1160,12 +1160,12 @@ rt_timer_init(void)
 	assert(rt_init_done == 0);
 
 	LIST_INIT(&rttimer_queue_head);
-	callout_init(&rt_timer_ch, 0);
-	callout_reset(&rt_timer_ch, hz, rt_timer_timer, NULL);
+	callout_init(&rt_timer_ch, CALLOUT_MPSAFE);
 	error = workqueue_create(&rt_timer_wq, "rt_timer",
 	    rt_timer_work, NULL, PRI_SOFTNET, IPL_SOFTNET, WQ_MPSAFE);
 	if (error)
 		panic("%s: workqueue_create failed (%d)\n", __func__, error);
+	callout_reset(&rt_timer_ch, hz, rt_timer_timer, NULL);
 	rt_init_done = 1;
 }
 

Reply via email to