From a9336cef393c402f11b7119f0a8b1de61ee2cc3d Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Mon, 11 Jun 2018 16:27:09 +0000 Subject: [PATCH] Use the cached curthread reference in pmc_process_interrupt(). Fix indentation while here. --- sys/dev/hwpmc/hwpmc_mod.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c index 65770110677b..e09151a6d339 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -4748,9 +4748,9 @@ pmc_process_interrupt(int ring, struct pmc *pm, struct trapframe *tf) td = curthread; if ((pm->pm_flags & PMC_F_USERCALLCHAIN) && - (td->td_proc->p_flag & P_KPROC) == 0 && - !TRAPF_USERMODE(tf)) { - atomic_add_int(&curthread->td_pmcpend, 1); + (td->td_proc->p_flag & P_KPROC) == 0 && + !TRAPF_USERMODE(tf)) { + atomic_add_int(&td->td_pmcpend, 1); return (pmc_add_sample(PMC_UR, pm, tf)); } return (pmc_add_sample(ring, pm, tf));