Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*
@@ -402,11 +402,11 @@
#define SCTP_SLC_REPORT_INTERVAL (30 * MINUTES)
#define SCTP_DECR_LISTEN_CNT(sctp) \
{ \
ASSERT((sctp)->sctp_listen_cnt->slc_cnt > 0); \
- if (atomic_add_32_nv(&(sctp)->sctp_listen_cnt->slc_cnt, -1) == 0) \
+ if (atomic_dec_32_nv(&(sctp)->sctp_listen_cnt->slc_cnt) == 0) \
kmem_free((sctp)->sctp_listen_cnt, sizeof (sctp_listen_cnt_t));\
(sctp)->sctp_listen_cnt = NULL; \
}
/* Increment and decrement the number of associations in sctp_stack_t. */