aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2015-05-22 17:05:21 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2015-05-22 17:05:21 +0000
commitfd90e2ed54a69bb07d14dcd4e805431ccb7d6cb6 (patch)
tree9c598a67317c5e22e5e44d49e8bb797cb28e79b9 /sys/netinet
parent316f4c880a15660086e5c9e7ee31f8b717e855f1 (diff)
downloadsrc-fd90e2ed54a69bb07d14dcd4e805431ccb7d6cb6.tar.gz
src-fd90e2ed54a69bb07d14dcd4e805431ccb7d6cb6.zip
CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten
years for head. However, it is continuously misused as the mpsafe argument for callout_init(9). Deprecate the flag and clean up callout_init() calls to make them more consistent. Differential Revision: https://reviews.freebsd.org/D2613 Reviewed by: jhb MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=283291
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/in_pcb.c2
-rw-r--r--sys/netinet/ip_mroute.c6
-rw-r--r--sys/netinet/tcp_hostcache.c2
-rw-r--r--sys/netinet/tcp_subr.c10
4 files changed, 10 insertions, 10 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index f8f290558ba6..bc48e105f69b 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -2249,7 +2249,7 @@ ipport_tick_init(const void *unused __unused)
{
/* Start ipport_tick. */
- callout_init(&ipport_tick_callout, CALLOUT_MPSAFE);
+ callout_init(&ipport_tick_callout, 1);
callout_reset(&ipport_tick_callout, 1, ipport_tick, NULL);
EVENTHANDLER_REGISTER(shutdown_pre_sync, ip_fini, NULL,
SHUTDOWN_PRI_DEFAULT);
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
index a71e91c42b26..ffa88ae43ac0 100644
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -2816,9 +2816,9 @@ vnet_mroute_init(const void *unused __unused)
MALLOC(V_nexpire, u_char *, mfchashsize, M_MRTABLE, M_WAITOK|M_ZERO);
bzero(V_bw_meter_timers, sizeof(V_bw_meter_timers));
- callout_init(&V_expire_upcalls_ch, CALLOUT_MPSAFE);
- callout_init(&V_bw_upcalls_ch, CALLOUT_MPSAFE);
- callout_init(&V_bw_meter_ch, CALLOUT_MPSAFE);
+ callout_init(&V_expire_upcalls_ch, 1);
+ callout_init(&V_bw_upcalls_ch, 1);
+ callout_init(&V_bw_meter_ch, 1);
}
VNET_SYSINIT(vnet_mroute_init, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_mroute_init,
diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c
index 6ff447ce2e35..a49254078d3d 100644
--- a/sys/netinet/tcp_hostcache.c
+++ b/sys/netinet/tcp_hostcache.c
@@ -238,7 +238,7 @@ tcp_hc_init(void)
/*
* Set up periodic cache cleanup.
*/
- callout_init(&V_tcp_hc_callout, CALLOUT_MPSAFE);
+ callout_init(&V_tcp_hc_callout, 1);
callout_reset(&V_tcp_hc_callout, V_tcp_hostcache.prune * hz,
tcp_hc_purge, curvnet);
}
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index d75221c40735..757bcf2e43db 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -791,11 +791,11 @@ tcp_newtcpcb(struct inpcb *inp)
V_tcp_mssdflt;
/* Set up our timeouts. */
- callout_init(&tp->t_timers->tt_rexmt, CALLOUT_MPSAFE);
- callout_init(&tp->t_timers->tt_persist, CALLOUT_MPSAFE);
- callout_init(&tp->t_timers->tt_keep, CALLOUT_MPSAFE);
- callout_init(&tp->t_timers->tt_2msl, CALLOUT_MPSAFE);
- callout_init(&tp->t_timers->tt_delack, CALLOUT_MPSAFE);
+ callout_init(&tp->t_timers->tt_rexmt, 1);
+ callout_init(&tp->t_timers->tt_persist, 1);
+ callout_init(&tp->t_timers->tt_keep, 1);
+ callout_init(&tp->t_timers->tt_2msl, 1);
+ callout_init(&tp->t_timers->tt_delack, 1);
if (V_tcp_do_rfc1323)
tp->t_flags = (TF_REQ_SCALE|TF_REQ_TSTMP);