Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*
*** 65,75 ****
static uint32_t afd_maxfd; /* # of entries in maximum allocated array */
static uint32_t afd_alloc; /* count of kmem_alloc()s */
static uint32_t afd_free; /* count of kmem_free()s */
static uint32_t afd_wait; /* count of waits on non-zero ref count */
#define MAXFD(x) (afd_maxfd = ((afd_maxfd >= (x))? afd_maxfd : (x)))
! #define COUNT(x) atomic_add_32(&x, 1)
#else /* DEBUG */
#define MAXFD(x)
#define COUNT(x)
--- 65,75 ----
static uint32_t afd_maxfd; /* # of entries in maximum allocated array */
static uint32_t afd_alloc; /* count of kmem_alloc()s */
static uint32_t afd_free; /* count of kmem_free()s */
static uint32_t afd_wait; /* count of waits on non-zero ref count */
#define MAXFD(x) (afd_maxfd = ((afd_maxfd >= (x))? afd_maxfd : (x)))
! #define COUNT(x) atomic_inc_32(&x)
#else /* DEBUG */
#define MAXFD(x)
#define COUNT(x)