Print this page
5042 stop using deprecated atomic functions

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/hxge/hxge_send.c
          +++ new/usr/src/uts/common/io/hxge/hxge_send.c
↓ open down ↓ 211 lines elided ↑ open up ↑
 212  212  
 213  213          HXGE_DEBUG_MSG((hxgep, TX_CTL,
 214  214              "TX Descriptor ring is channel %d mark mode %d",
 215  215              tx_ring_p->tdc, mark_mode));
 216  216  
 217  217          if (!hxge_txdma_reclaim(hxgep, tx_ring_p, hxge_tx_minfree)) {
 218  218                  HXGE_DEBUG_MSG((hxgep, TX_CTL,
 219  219                      "TX Descriptor ring is full: channel %d", tx_ring_p->tdc));
 220  220                  HXGE_DEBUG_MSG((hxgep, TX_CTL,
 221  221                      "TX Descriptor ring is full: channel %d", tx_ring_p->tdc));
 222      -                (void) cas32((uint32_t *)&tx_ring_p->queueing, 0, 1);
      222 +                (void) atomic_cas_32((uint32_t *)&tx_ring_p->queueing, 0, 1);
 223  223                  tdc_stats->tx_no_desc++;
 224  224                  MUTEX_EXIT(&tx_ring_p->lock);
 225  225                  status = 1;
 226  226                  goto hxge_start_fail1;
 227  227          }
 228  228  
 229  229          nmp = mp;
 230  230          i = sop_index = tx_ring_p->wr_index;
 231  231          nmblks = 0;
 232  232          ngathers = 0;
↓ open down ↓ 612 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX