diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index c191fc4bd9d4..a757ee679d85 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_clock.c,v 1.110 2007/08/09 07:36:18 pooka Exp $ */ +/* $NetBSD: kern_clock.c,v 1.111 2007/10/03 11:05:58 ad Exp $ */ /*- * Copyright (c) 2000, 2004, 2006, 2007 The NetBSD Foundation, Inc. @@ -76,7 +76,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_clock.c,v 1.110 2007/08/09 07:36:18 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_clock.c,v 1.111 2007/10/03 11:05:58 ad Exp $"); #include "opt_ntp.h" #include "opt_multiprocessor.h" @@ -947,13 +947,9 @@ proftick(struct clockframe *frame) } } #endif -#ifdef PROC_PC - if (p != NULL) { - mutex_spin_enter(&p->p_stmutex); - if (p->p_stflag & PST_PROFIL)) - addupc_intr(l, PROC_PC(p)); - mutex_spin_exit(&p->p_stmutex); - } +#ifdef LWP_PC + if (p != NULL && (p->p_stflag & PST_PROFIL) != 0) + addupc_intr(l, LWP_PC(p)); #endif } }