Print this page
5042 stop using deprecated atomic functions

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/nxge/nxge_txdma.c
          +++ new/usr/src/uts/common/io/nxge/nxge_txdma.c
↓ open down ↓ 1075 lines elided ↑ open up ↑
1076 1076                              tx_ring_p->tx_wrap_mask;
1077 1077                          tx_ring_p->rd_index = tx_rd_index;
1078 1078                          tx_ring_p->descs_pending--;
1079 1079                          tx_desc_p = &tx_desc_ring_vp[tx_rd_index];
1080 1080                          tx_msg_p = &tx_msg_ring[tx_rd_index];
1081 1081                  }
1082 1082  
1083 1083                  status = (nmblks <= ((int)tx_ring_p->tx_ring_size -
1084 1084                      (int)tx_ring_p->descs_pending - TX_FULL_MARK));
1085 1085                  if (status) {
1086      -                        (void) cas32((uint32_t *)&tx_ring_p->queueing, 1, 0);
     1086 +                        (void) atomic_cas_32((uint32_t *)&tx_ring_p->queueing,
     1087 +                            1, 0);
1087 1088                  }
1088 1089          } else {
1089 1090                  status = (nmblks <= ((int)tx_ring_p->tx_ring_size -
1090 1091                      (int)tx_ring_p->descs_pending - TX_FULL_MARK));
1091 1092          }
1092 1093  
1093 1094          NXGE_DEBUG_MSG((nxgep, TX_CTL,
1094 1095              "<== nxge_txdma_reclaim status = 0x%08x", status));
1095 1096  
1096 1097          return (status);
↓ open down ↓ 2589 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX