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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/ib/clients/rdsv3/rds_recv.c
          +++ new/usr/src/uts/common/io/ib/clients/rdsv3/rds_recv.c
↓ open down ↓ 56 lines elided ↑ open up ↑
  57   57          inc->i_conn = conn;
  58   58          inc->i_saddr = saddr;
  59   59          inc->i_rdma_cookie = 0;
  60   60  }
  61   61  
  62   62  void
  63   63  rdsv3_inc_addref(struct rdsv3_incoming *inc)
  64   64  {
  65   65          RDSV3_DPRINTF4("rdsv3_inc_addref",
  66   66              "addref inc %p ref %d", inc, atomic_get(&inc->i_refcount));
  67      -        atomic_add_32(&inc->i_refcount, 1);
       67 +        atomic_inc_32(&inc->i_refcount);
  68   68  }
  69   69  
  70   70  void
  71   71  rdsv3_inc_put(struct rdsv3_incoming *inc)
  72   72  {
  73   73          RDSV3_DPRINTF4("rdsv3_inc_put", "put inc %p ref %d",
  74   74              inc, atomic_get(&inc->i_refcount));
  75   75          if (atomic_dec_and_test(&inc->i_refcount)) {
  76   76                  ASSERT(!list_link_active(&inc->i_item));
  77   77  
↓ open down ↓ 599 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX