Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*

*** 369,379 **** #define TCP_TLC_REPORT_INTERVAL (30 * MINUTES) #define TCP_DECR_LISTEN_CNT(tcp) \ { \ ASSERT((tcp)->tcp_listen_cnt->tlc_cnt > 0); \ ! if (atomic_add_32_nv(&(tcp)->tcp_listen_cnt->tlc_cnt, -1) == 0) \ kmem_free((tcp)->tcp_listen_cnt, sizeof (tcp_listen_cnt_t)); \ (tcp)->tcp_listen_cnt = NULL; \ } /* Increment and decrement the number of connections in tcp_stack_t. */ --- 369,379 ---- #define TCP_TLC_REPORT_INTERVAL (30 * MINUTES) #define TCP_DECR_LISTEN_CNT(tcp) \ { \ ASSERT((tcp)->tcp_listen_cnt->tlc_cnt > 0); \ ! if (atomic_dec_32_nv(&(tcp)->tcp_listen_cnt->tlc_cnt) == 0) \ kmem_free((tcp)->tcp_listen_cnt, sizeof (tcp_listen_cnt_t)); \ (tcp)->tcp_listen_cnt = NULL; \ } /* Increment and decrement the number of connections in tcp_stack_t. */