Print this page
5042 stop using deprecated atomic functions

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/disp/ts.c
          +++ new/usr/src/uts/common/disp/ts.c
↓ open down ↓ 642 lines elided ↑ open up ↑
 643  643           */
 644  644          TS_LIST_INSERT(tspp);
 645  645  
 646  646          /*
 647  647           * If this is the first time-sharing thread to occur since
 648  648           * boot we set up the initial call to ts_update() here.
 649  649           * Use an atomic compare-and-swap since that's easier and
 650  650           * faster than a mutex (but check with an ordinary load first
 651  651           * since most of the time this will already be done).
 652  652           */
 653      -        if (tspexists == 0 && cas32(&tspexists, 0, 1) == 0)
      653 +        if (tspexists == 0 && atomic_cas_32(&tspexists, 0, 1) == 0)
 654  654                  (void) timeout(ts_update, NULL, hz);
 655  655  
 656  656          return (0);
 657  657  }
 658  658  
 659  659  
 660  660  /*
 661  661   * Free tsproc structure of thread.
 662  662   */
 663  663  static void
↓ open down ↓ 1764 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX