Print this page
5042 stop using deprecated atomic functions

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/cpuvar.h
          +++ new/usr/src/uts/common/sys/cpuvar.h
↓ open down ↓ 520 lines elided ↑ open up ↑
 521  521  
 522  522  #define CPUSET_FIND(set, cpu)           {               \
 523  523          cpu = (uint_t)(lowbit(set) - 1);                                \
 524  524  }
 525  525  
 526  526  #define CPUSET_BOUNDS(set, smallest, largest)   {       \
 527  527          smallest = (uint_t)(lowbit(set) - 1);           \
 528  528          largest = (uint_t)(highbit(set) - 1);           \
 529  529  }
 530  530  
 531      -#define CPUSET_ATOMIC_DEL(set, cpu)     atomic_and_long(&(set), ~CPUSET(cpu))
 532      -#define CPUSET_ATOMIC_ADD(set, cpu)     atomic_or_long(&(set), CPUSET(cpu))
      531 +#define CPUSET_ATOMIC_DEL(set, cpu)     atomic_and_ulong(&(set), ~CPUSET(cpu))
      532 +#define CPUSET_ATOMIC_ADD(set, cpu)     atomic_or_ulong(&(set), CPUSET(cpu))
 533  533  
 534  534  #define CPUSET_ATOMIC_XADD(set, cpu, result) \
 535  535          { result = atomic_set_long_excl(&(set), (cpu)); }
 536  536  
 537  537  #define CPUSET_ATOMIC_XDEL(set, cpu, result) \
 538  538          { result = atomic_clear_long_excl(&(set), (cpu)); }
 539  539  
 540  540  #else   /* CPUSET_WORDS <= 0 */
 541  541  
 542  542  #error NCPU is undefined or invalid
↓ open down ↓ 297 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX