Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/ip/ip_ndp.c
          +++ new/usr/src/uts/common/inet/ip/ip_ndp.c
↓ open down ↓ 471 lines elided ↑ open up ↑
 472  472          }
 473  473          /*
 474  474           * Caller has a refhold. Also 1 ref for being in the list. Thus
 475  475           * refcnt has to be >= 2
 476  476           */
 477  477          ASSERT(ncec->ncec_refcnt >= 2);
 478  478          ncec->ncec_flags |= NCE_F_CONDEMNED;
 479  479          mutex_exit(&ncec->ncec_lock);
 480  480  
 481  481          /* Count how many condemned ires for kmem_cache callback */
 482      -        atomic_add_32(&ipst->ips_num_nce_condemned, 1);
      482 +        atomic_inc_32(&ipst->ips_num_nce_condemned);
 483  483          nce_fastpath_list_delete(ncec->ncec_ill, ncec, NULL);
 484  484  
 485  485          /* Complete any waiting callbacks */
 486  486          ncec_cb_dispatch(ncec);
 487  487  
 488  488          /*
 489  489           * Cancel any running timer. Timeout can't be restarted
 490  490           * since CONDEMNED is set. Can't hold ncec_lock across untimeout.
 491  491           * Passing invalid timeout id is fine.
 492  492           */
↓ open down ↓ 4584 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX