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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/fio.c
          +++ new/usr/src/uts/common/os/fio.c
↓ open down ↓ 59 lines elided ↑ open up ↑
  60   60  #include <c2/audit.h>
  61   61  #include <sys/nbmlock.h>
  62   62  
  63   63  #ifdef DEBUG
  64   64  
  65   65  static uint32_t afd_maxfd;      /* # of entries in maximum allocated array */
  66   66  static uint32_t afd_alloc;      /* count of kmem_alloc()s */
  67   67  static uint32_t afd_free;       /* count of kmem_free()s */
  68   68  static uint32_t afd_wait;       /* count of waits on non-zero ref count */
  69   69  #define MAXFD(x)        (afd_maxfd = ((afd_maxfd >= (x))? afd_maxfd : (x)))
  70      -#define COUNT(x)        atomic_add_32(&x, 1)
       70 +#define COUNT(x)        atomic_inc_32(&x)
  71   71  
  72   72  #else   /* DEBUG */
  73   73  
  74   74  #define MAXFD(x)
  75   75  #define COUNT(x)
  76   76  
  77   77  #endif  /* DEBUG */
  78   78  
  79   79  kmem_cache_t *file_cache;
  80   80  
↓ open down ↓ 1744 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX