Print this page
5042 stop using deprecated atomic functions

@@ -896,11 +896,11 @@
         int retval = 0;
         int pages_claimed = 0;
         cheetah_livelock_entry_t *histp;
         uint64_t idsr;
 
-        if (cas32(&sendmondo_in_recover, 0, 1) != 0) {
+        if (atomic_cas_32(&sendmondo_in_recover, 0, 1) != 0) {
                 /*
                  * Wait while recovery takes place
                  */
                 while (sendmondo_in_recover) {
                         drv_usecwait(1);

@@ -982,11 +982,11 @@
         CHEETAH_LIVELOCK_MAXSTAT(hrt, (end_hrt - begin_hrt));
         CHEETAH_LIVELOCK_MAXSTAT(full_claimed, pages_claimed);
         CHEETAH_LIVELOCK_ENTRY_SET(histp, recovery_time, \
             (end_hrt -  begin_hrt));
 
-        while (cas32(&sendmondo_in_recover, 1, 0) != 1)
+        while (atomic_cas_32(&sendmondo_in_recover, 1, 0) != 1)
                 ;
 
         return (retval);
 }
 

@@ -6298,11 +6298,11 @@
 
         if (CPU_PRIVATE(CPU) == NULL)
                 return (0);
 
         clop = CPU_PRIVATE_PTR(CPU, chpr_cecc_logout);
-        if (cas64(&clop->clo_data.chd_afar, LOGOUT_INVALID, afar) !=
+        if (atomic_cas_64(&clop->clo_data.chd_afar, LOGOUT_INVALID, afar) !=
             LOGOUT_INVALID)
                 return (0);
 
         cpu_delayed_logout(afar, clop);
         return (1);