Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*
*** 936,946 ****
* 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);
/*
* Note that t_lwp is always set to point at the underlying
* thread, thus this will work in the presence of nested
* interrupts.
--- 936,946 ----
* that was running when the interrupt went off.
*/
if (t->t_flag & T_INTR_THREAD) {
klwp_t *lwp;
! 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,1016 ****
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);
} 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.
--- 1006,1016 ----
panic("null cpc context, thread %p", (void *)t);
#ifdef DEBUG
cmn_err(CE_NOTE,
"null cpc context found in overflow handler!\n");
#endif
! 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.