Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*
@@ -506,11 +506,11 @@
ill->ill_mcast_v1_time = 0;
ill->ill_mcast_v1_tset = 1;
if (ill->ill_mcast_type != IGMP_V1_ROUTER) {
ip1dbg(("Received IGMPv1 Query on %s, switching mode "
"to IGMP_V1_ROUTER\n", ill->ill_name));
- atomic_add_16(&ill->ill_ifptr->illif_mcast_v1, 1);
+ atomic_inc_16(&ill->ill_ifptr->illif_mcast_v1);
ill->ill_mcast_type = IGMP_V1_ROUTER;
}
timer = SEC_TO_MSEC(IGMP_MAX_HOST_REPORT_DELAY);
@@ -543,11 +543,11 @@
* state if v1 but do reset the v2-querier-present timer.
*/
if (ill->ill_mcast_type == IGMP_V3_ROUTER) {
ip1dbg(("Received IGMPv2 Query on %s, switching mode "
"to IGMP_V2_ROUTER", ill->ill_name));
- atomic_add_16(&ill->ill_ifptr->illif_mcast_v2, 1);
+ atomic_inc_16(&ill->ill_ifptr->illif_mcast_v2);
ill->ill_mcast_type = IGMP_V2_ROUTER;
}
ill->ill_mcast_v2_time = 0;
ill->ill_mcast_v2_tset = 1;
@@ -1714,22 +1714,22 @@
ill->ill_mcast_type =
IGMP_V3_ROUTER;
}
ill->ill_mcast_v1_time = 0;
ill->ill_mcast_v1_tset = 0;
- atomic_add_16(&ifp->illif_mcast_v1, -1);
+ atomic_dec_16(&ifp->illif_mcast_v1);
}
if ((ill->ill_mcast_type == IGMP_V2_ROUTER) &&
(ipst->ips_igmp_max_version >= IGMP_V3_ROUTER) &&
(ill->ill_mcast_v2_time >= OVQP(ill))) {
ip1dbg(("V2 query timer expired on "
"%s; switching mode to IGMP_V3\n",
ill->ill_name));
ill->ill_mcast_type = IGMP_V3_ROUTER;
ill->ill_mcast_v2_time = 0;
ill->ill_mcast_v2_tset = 0;
- atomic_add_16(&ifp->illif_mcast_v2, -1);
+ atomic_dec_16(&ifp->illif_mcast_v2);
}
rw_exit(&ill->ill_mcast_lock);
ill_refrele(ill);
rw_enter(&ipst->ips_ill_g_lock, RW_READER);
}
@@ -1784,11 +1784,11 @@
" %s; switching mode to MLD_V2\n",
ill->ill_name));
ill->ill_mcast_type = MLD_V2_ROUTER;
ill->ill_mcast_v1_time = 0;
ill->ill_mcast_v1_tset = 0;
- atomic_add_16(&ifp->illif_mcast_v1, -1);
+ atomic_dec_16(&ifp->illif_mcast_v1);
}
rw_exit(&ill->ill_mcast_lock);
ill_refrele(ill);
rw_enter(&ipst->ips_ill_g_lock, RW_READER);
}
@@ -2214,11 +2214,11 @@
ill->ill_mcast_v1_time = 0;
ill->ill_mcast_v1_tset = 1;
if (ill->ill_mcast_type == MLD_V2_ROUTER) {
ip1dbg(("Received MLDv1 Query on %s, switching mode to "
"MLD_V1_ROUTER\n", ill->ill_name));
- atomic_add_16(&ill->ill_ifptr->illif_mcast_v1, 1);
+ atomic_inc_16(&ill->ill_ifptr->illif_mcast_v1);
ill->ill_mcast_type = MLD_V1_ROUTER;
}
timer = (int)ntohs(mldh->mld_maxdelay);
if (ip_debug > 1) {