Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*
@@ -3130,11 +3130,11 @@
mutex_enter(&tx->lock);
/* check to see if the slots are really there */
avail = tx->mask - (tx->req - tx->done);
if (unlikely(avail <= MYRI10GE_MAX_SEND_DESC_TSO)) {
- atomic_add_32(&tx->stall, 1);
+ atomic_inc_32(&tx->stall);
mutex_exit(&tx->lock);
return (EBUSY);
}
/* copy */
@@ -3371,11 +3371,11 @@
* message to fit.
*/
if (avail < max_segs) {
err = EBUSY;
- atomic_add_32(&tx->stall_early, 1);
+ atomic_inc_32(&tx->stall_early);
goto stall;
}
/* find out how long the frame is and how many segments it is */
count = 0;
@@ -3636,11 +3636,11 @@
mutex_exit(&tx->lock);
return (DDI_SUCCESS);
late_stall:
try_pullup = 0;
- atomic_add_32(&tx->stall_late, 1);
+ atomic_inc_32(&tx->stall_late);
abort_with_handles:
/* unbind and free handles from previous mblks */
for (i = 0; i < count; i++) {
bp = tx_info[i].m;
@@ -3669,11 +3669,11 @@
}
stall:
if (err != 0) {
if (err == EBUSY) {
- atomic_add_32(&tx->stall, 1);
+ atomic_inc_32(&tx->stall);
} else {
MYRI10GE_ATOMIC_SLICE_STAT_INC(xmit_err);
}
}
return (err);