Print this page
5042 stop using deprecated atomic functions

@@ -1729,11 +1729,11 @@
          * Use OTHERQ(q), because qreply(q, mp) == putnext(OTHERQ(q), mp),
          * and I want this module to say putnext(*_pfkey_q, mp) for PF_KEY
          * messages.
          */
 
-        oldq = casptr((void **)pfkey_qp, NULL, OTHERQ(q));
+        oldq = atomic_cas_ptr((void **)pfkey_qp, NULL, OTHERQ(q));
         if (oldq != NULL) {
                 ASSERT(oldq != q);
                 cmn_err(CE_WARN, "Danger!  Multiple keysocks on top of %s.\n",
                     (satype == SADB_SATYPE_ESP)? "ESP" : "AH or other");
                 freemsg(mp);

@@ -1744,12 +1744,12 @@
         kha->ks_hello_len = sizeof (keysock_hello_ack_t);
         kha->ks_hello_type = KEYSOCK_HELLO_ACK;
         kha->ks_hello_satype = (uint8_t)satype;
 
         /*
-         * If we made it past the casptr, then we have "exclusive" access
-         * to the timeout handle.  Fire it off after the default ager
+         * If we made it past the atomic_cas_ptr, then we have "exclusive"
+         * access to the timeout handle.  Fire it off after the default ager
          * interval.
          */
         *top = qtimeout(*pfkey_qp, ager, agerarg,
             drv_usectohz(SADB_AGE_INTERVAL_DEFAULT * 1000));