Print this page
5042 stop using deprecated atomic functions

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/disp/fss.c
          +++ new/usr/src/uts/common/disp/fss.c
↓ open down ↓ 1437 lines elided ↑ open up ↑
1438 1438           */
1439 1439          FSS_LIST_INSERT(fssproc);
1440 1440  
1441 1441          /*
1442 1442           * If this is the first fair-sharing thread to occur since boot,
1443 1443           * we set up the initial call to fss_update() here. Use an atomic
1444 1444           * compare-and-swap since that's easier and faster than a mutex
1445 1445           * (but check with an ordinary load first since most of the time
1446 1446           * this will already be done).
1447 1447           */
1448      -        if (fssexists == 0 && cas32(&fssexists, 0, 1) == 0)
     1448 +        if (fssexists == 0 && atomic_cas_32(&fssexists, 0, 1) == 0)
1449 1449                  (void) timeout(fss_update, NULL, hz);
1450 1450  
1451 1451          return (0);
1452 1452  }
1453 1453  
1454 1454  /*
1455 1455   * Remove fssproc_t from the list.
1456 1456   */
1457 1457  static void
1458 1458  fss_exitclass(void *procp)
↓ open down ↓ 1221 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX