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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/vm/hat_i86.c
          +++ new/usr/src/uts/i86pc/vm/hat_i86.c
↓ open down ↓ 1219 lines elided ↑ open up ↑
1220 1220  
1221 1221          return (total);
1222 1222  }
1223 1223  
1224 1224  /*
1225 1225   * enable/disable collection of stats for hat.
1226 1226   */
1227 1227  int
1228 1228  hat_stats_enable(hat_t *hat)
1229 1229  {
1230      -        atomic_add_32(&hat->hat_stats, 1);
     1230 +        atomic_inc_32(&hat->hat_stats);
1231 1231          return (1);
1232 1232  }
1233 1233  
1234 1234  void
1235 1235  hat_stats_disable(hat_t *hat)
1236 1236  {
1237      -        atomic_add_32(&hat->hat_stats, -1);
     1237 +        atomic_dec_32(&hat->hat_stats);
1238 1238  }
1239 1239  
1240 1240  /*
1241 1241   * Utility to sync the ref/mod bits from a page table entry to the page_t
1242 1242   * We must be holding the mapping list lock when this is called.
1243 1243   */
1244 1244  static void
1245 1245  hati_sync_pte_to_page(page_t *pp, x86pte_t pte, level_t level)
1246 1246  {
1247 1247          uint_t  rm = 0;
↓ open down ↓ 3216 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX