Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*
*** 11774,11784 ****
static void
ipif_assign_seqid(ipif_t *ipif)
{
ip_stack_t *ipst = ipif->ipif_ill->ill_ipst;
! ipif->ipif_seqid = atomic_add_64_nv(&ipst->ips_ipif_g_seqid, 1);
}
/*
* Clone the contents of `sipif' to `dipif'. Requires that both ipifs are
* administratively down (i.e., no DAD), of the same type, and locked. Note
--- 11774,11784 ----
static void
ipif_assign_seqid(ipif_t *ipif)
{
ip_stack_t *ipst = ipif->ipif_ill->ill_ipst;
! ipif->ipif_seqid = atomic_inc_64_nv(&ipst->ips_ipif_g_seqid);
}
/*
* Clone the contents of `sipif' to `dipif'. Requires that both ipifs are
* administratively down (i.e., no DAD), of the same type, and locked. Note
*** 12447,12459 ****
*/
void
ip_update_source_selection(ip_stack_t *ipst)
{
/* We skip past SRC_GENERATION_VERIFY */
! if (atomic_add_32_nv(&ipst->ips_src_generation, 1) ==
SRC_GENERATION_VERIFY)
! atomic_add_32(&ipst->ips_src_generation, 1);
}
/*
* Finish the group join started in ip_sioctl_groupname().
*/
--- 12447,12459 ----
*/
void
ip_update_source_selection(ip_stack_t *ipst)
{
/* We skip past SRC_GENERATION_VERIFY */
! if (atomic_inc_32_nv(&ipst->ips_src_generation) ==
SRC_GENERATION_VERIFY)
! atomic_inc_32(&ipst->ips_src_generation);
}
/*
* Finish the group join started in ip_sioctl_groupname().
*/