Print this page
5042 stop using deprecated atomic functions

@@ -291,11 +291,11 @@
         if (fem_create("portfop_fem",
             (const struct fs_operation_def *)port_vnodesrc_template,
             (fem_t **)&femp)) {
                 return (NULL);
         }
-        if (casptr(&fop_femop, NULL, femp) != NULL) {
+        if (atomic_cas_ptr(&fop_femop, NULL, femp) != NULL) {
                 /*
                  * some other thread beat us to it.
                  */
                 fem_free(femp);
         }

@@ -309,11 +309,11 @@
         if (fop_fsemop != NULL)
                 return (fop_fsemop);
         if (fsem_create("portfop_fsem", port_vfssrc_template, &fsemp)) {
                 return (NULL);
         }
-        if (casptr(&fop_fsemop, NULL, fsemp) != NULL) {
+        if (atomic_cas_ptr(&fop_fsemop, NULL, fsemp) != NULL) {
                 /*
                  * some other thread beat us to it.
                  */
                 fsem_free(fsemp);
         }

@@ -1085,11 +1085,11 @@
             offsetof(portfop_t, pfop_node));
         npvp->pvp_vp = vp;
         /*
          * If v_fopdata is not null, some other thread beat us to it.
          */
-        if (casptr(&vp->v_fopdata, NULL, npvp) != NULL) {
+        if (atomic_cas_ptr(&vp->v_fopdata, NULL, npvp) != NULL) {
                 mutex_destroy(&npvp->pvp_mutex);
                 list_destroy(&npvp->pvp_pfoplist);
                 kmem_free(npvp, sizeof (*npvp));
         }
 }