[BACK]Return to if.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / net

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

Diff for /src/sys/net/if.c between version 1.438 and 1.439

version 1.438, 2018/10/30 05:27:51 version 1.439, 2018/10/30 05:29:21
Line 1784  void
Line 1784  void
 ifaref(struct ifaddr *ifa)  ifaref(struct ifaddr *ifa)
 {  {
   
         ifa->ifa_refcnt++;          atomic_inc_uint(&ifa->ifa_refcnt);
 }  }
   
 void  void
Line 1793  ifafree(struct ifaddr *ifa)
Line 1793  ifafree(struct ifaddr *ifa)
         KASSERT(ifa != NULL);          KASSERT(ifa != NULL);
         KASSERT(ifa->ifa_refcnt > 0);          KASSERT(ifa->ifa_refcnt > 0);
   
         if (--ifa->ifa_refcnt == 0) {          if (atomic_dec_uint_nv(&ifa->ifa_refcnt) == 0) {
                 free(ifa, M_IFADDR);                  free(ifa, M_IFADDR);
         }          }
 }  }

Legend:
Removed from v.1.438  
changed lines
  Added in v.1.439

CVSweb <webmaster@jp.NetBSD.org>