Print this page
5042 stop using deprecated atomic functions

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/hxge/hxge_txdma.c
          +++ new/usr/src/uts/common/io/hxge/hxge_txdma.c
↓ open down ↓ 779 lines elided ↑ open up ↑
 780  780                              tx_ring_p->tx_wrap_mask;
 781  781                          tx_ring_p->rd_index = tx_rd_index;
 782  782                          tx_ring_p->descs_pending--;
 783  783                          tx_desc_p = &tx_desc_ring_vp[tx_rd_index];
 784  784                          tx_msg_p = &tx_msg_ring[tx_rd_index];
 785  785                  }
 786  786  
 787  787                  status = (nmblks <= ((int)tx_ring_p->tx_ring_size -
 788  788                      (int)tx_ring_p->descs_pending - TX_FULL_MARK));
 789  789                  if (status) {
 790      -                        (void) cas32((uint32_t *)&tx_ring_p->queueing, 1, 0);
      790 +                        (void) atomic_cas_32((uint32_t *)&tx_ring_p->queueing,
      791 +                            1, 0);
 791  792                  }
 792  793          } else {
 793  794                  status = (nmblks <= ((int)tx_ring_p->tx_ring_size -
 794  795                      (int)tx_ring_p->descs_pending - TX_FULL_MARK));
 795  796          }
 796  797  
 797  798          HXGE_DEBUG_MSG((hxgep, TX_CTL,
 798  799              "<== hxge_txdma_reclaim status = 0x%08x", status));
 799  800          return (status);
 800  801  }
↓ open down ↓ 2137 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX