summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_ktr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_ktr.c')
-rw-r--r--sys/kern/kern_ktr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_ktr.c b/sys/kern/kern_ktr.c
index 3f00c8d..1422a3e 100644
--- a/sys/kern/kern_ktr.c
+++ b/sys/kern/kern_ktr.c
@@ -117,7 +117,8 @@ ktr_tracepoint(u_int mask, const char *format, u_long arg1, u_long arg2,
#endif
{
struct ktr_entry *entry;
- int newindex, saveindex, saveintr;
+ int newindex, saveindex;
+ critical_t savecrit;
#ifdef KTR_EXTEND
va_list ap;
#endif
@@ -130,14 +131,13 @@ ktr_tracepoint(u_int mask, const char *format, u_long arg1, u_long arg2,
if (((1 << KTR_CPU) & ktr_cpumask) == 0)
return;
#endif
- saveintr = save_intr();
- disable_intr();
+ savecrit = critical_enter();
do {
saveindex = ktr_idx;
newindex = (saveindex + 1) & (KTR_ENTRIES - 1);
} while (atomic_cmpset_rel_int(&ktr_idx, saveindex, newindex) == 0);
entry = &ktr_buf[saveindex];
- restore_intr(saveintr);
+ critical_exit(savecrit);
if (ktr_mask & KTR_LOCK)
/*
* We can't use nanotime with KTR_LOCK, it would cause
OpenPOWER on IntegriCloud