Print this page
vm: be careful about empty statements

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/vm/page.h
          +++ new/usr/src/uts/common/vm/page.h
↓ open down ↓ 87 lines elided ↑ open up ↑
  88   88   * also defined.
  89   89   */
  90   90  #ifdef DEBUG
  91   91  #define VM_STATS
  92   92  #endif  /* DEBUG */
  93   93  
  94   94  #ifdef VM_STATS
  95   95  #define VM_STAT_ADD(stat)                       (stat)++
  96   96  #define VM_STAT_COND_ADD(cond, stat)            ((void) (!(cond) || (stat)++))
  97   97  #else
  98      -#define VM_STAT_ADD(stat)
  99      -#define VM_STAT_COND_ADD(cond, stat)
       98 +#define VM_STAT_ADD(stat)                       do { } while (0)
       99 +#define VM_STAT_COND_ADD(cond, stat)            do { } while (0)
 100  100  #endif  /* VM_STATS */
 101  101  
 102  102  #ifdef _KERNEL
 103  103  
 104  104  /*
 105  105   * PAGE_LLOCK_SIZE is 2 * NCPU, but no smaller than 128.
 106  106   * PAGE_LLOCK_SHIFT is log2(PAGE_LLOCK_SIZE).
 107  107   *
 108  108   * We use ? : instead of #if because <vm/page.h> is included everywhere;
 109  109   * NCPU_P2 is only a constant in the "unix" module.
↓ open down ↓ 1124 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX