Print this page
5042 stop using deprecated atomic functions

@@ -796,11 +796,12 @@
                 if ((oldrtfu & DBLK_RTFU_REF_MASK) == DBLK_RTFU_REF_MASK) {
                         kmem_cache_free(mblk_cache, new_mp);
                         new_mp = NULL;
                         goto out;
                 }
-        } while (cas32(&DBLK_RTFU_WORD(dbp), oldrtfu, newrtfu) != oldrtfu);
+        } while (atomic_cas_32(&DBLK_RTFU_WORD(dbp), oldrtfu, newrtfu) !=
+            oldrtfu);
 
 out:
         FTRACE_1("dupb(): new_mp=0x%lx", (uintptr_t)new_mp);
         return (new_mp);
 }

@@ -4248,11 +4249,11 @@
                          * Just in case there is another thread about
                          * to get the next index, we need to make sure
                          * the value is there for it.
                          */
                         membar_producer();
-                        if (casptr(&hp->tail, bp, nbp) == bp) {
+                        if (atomic_cas_ptr(&hp->tail, bp, nbp) == bp) {
                                 /* CAS was successful */
                                 bp->nxt = nbp;
                                 membar_producer();
                                 bp = nbp;
                                 ix = 0;

@@ -4262,11 +4263,11 @@
                                 bp = hp->tail;
                                 continue;
                         }
                 }
                 nix = ix + 1;
-                if (cas32((uint32_t *)&bp->ix, ix, nix) == ix) {
+                if (atomic_cas_32((uint32_t *)&bp->ix, ix, nix) == ix) {
                 cas_good:
                         if (curthread != hp->thread) {
                                 hp->thread = curthread;
                                 evnt |= FTEV_CS;
                         }