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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/cxgbe/t4nex/t4_l2t.c
          +++ new/usr/src/uts/common/io/cxgbe/t4nex/t4_l2t.c
↓ open down ↓ 414 lines elided ↑ open up ↑
 415  415                  /*
 416  416                   * Don't need to worry about the arpq, an L2T entry can't be
 417  417                   * released if any packets are waiting for resolution as we
 418  418                   * need to be able to communicate with the device to close a
 419  419                   * connection.
 420  420                   */
 421  421          }
 422  422          mutex_exit(&e->lock);
 423  423  
 424  424          d = container_of(e, struct l2t_data, l2tab[e->idx]);
 425      -        atomic_add_int(&d->nfree, 1);
      425 +        atomic_inc_uint(&d->nfree);
 426  426  
 427  427  }
 428  428  
 429  429  void
 430  430  t4_l2t_release(struct l2t_entry *e)
 431  431  {
 432  432          if (atomic_dec_uint_nv(&e->refcnt) == 0)
 433  433                  t4_l2e_free(e);
 434  434  }
 435  435  
↓ open down ↓ 129 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX