Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*

@@ -936,11 +936,11 @@
          * that was running when the interrupt went off.
          */
         if (t->t_flag & T_INTR_THREAD) {
                 klwp_t *lwp;
 
-                atomic_add_32(&kcpc_intrctx_count, 1);
+                atomic_inc_32(&kcpc_intrctx_count);
 
                 /*
                  * Note that t_lwp is always set to point at the underlying
                  * thread, thus this will work in the presence of nested
                  * interrupts.

@@ -1006,11 +1006,11 @@
                         panic("null cpc context, thread %p", (void *)t);
 #ifdef DEBUG
                 cmn_err(CE_NOTE,
                     "null cpc context found in overflow handler!\n");
 #endif
-                atomic_add_32(&kcpc_nullctx_count, 1);
+                atomic_inc_32(&kcpc_nullctx_count);
         } else if ((ctx->kc_flags & KCPC_CTX_INVALID) == 0) {
                 /*
                  * Schedule an ast to sample the counters, which will
                  * propagate any overflow into the virtualized performance
                  * counter(s), and may deliver a signal.