Print this page
5042 stop using deprecated atomic functions

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/sun4/vm/vm_dep.c
          +++ new/usr/src/uts/sun4/vm/vm_dep.c
↓ open down ↓ 890 lines elided ↑ open up ↑
 891  891          uint32_t old, new;
 892  892  
 893  893          if (consistent_coloring == 2 || color_start_random) {
 894  894                  return ((uint_t)(((gettick()) << (vac_shift - MMU_PAGESHIFT)) &
 895  895                      (hw_page_array[0].hp_colors - 1)));
 896  896          }
 897  897  
 898  898          do {
 899  899                  old = color_start_current;
 900  900                  new = old + (color_start_stride << (vac_shift - MMU_PAGESHIFT));
 901      -        } while (cas32(&color_start_current, old, new) != old);
      901 +        } while (atomic_cas_32(&color_start_current, old, new) != old);
 902  902  
 903  903          return ((uint_t)(new));
 904  904  }
 905  905  
 906  906  /*
 907  907   * Called once at startup from kphysm_init() -- before memialloc()
 908  908   * is invoked to do the 1st page_free()/page_freelist_add().
 909  909   *
 910  910   * initializes page_colors and page_colors_mask based on ecache_setsize.
 911  911   *
↓ open down ↓ 167 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX