diff options
author | jhb <jhb@FreeBSD.org> | 2004-09-23 21:03:58 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2004-09-23 21:03:58 +0000 |
commit | d0df115aaaa199c5e42d0a72332c770a6376774a (patch) | |
tree | 73e094c80b2367d17150f62b5ee067064d3f5ac4 /sys | |
parent | f6dc0c3d5f160a703d21fda35457eb69960b8e85 (diff) | |
download | FreeBSD-src-d0df115aaaa199c5e42d0a72332c770a6376774a.zip FreeBSD-src-d0df115aaaa199c5e42d0a72332c770a6376774a.tar.gz |
Don't try to protect td_sticks with sched_lock. It doesn't need it as it
is only accessed by curthread.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/subr_trap.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index 55b23c9..7753823 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -123,9 +123,7 @@ userret(td, frame, oticks) if (p->p_flag & P_PROFIL) { quad_t ticks; - mtx_lock_spin(&sched_lock); ticks = td->td_sticks - oticks; - mtx_unlock_spin(&sched_lock); addupc_task(td, TRAPF_PC(frame), (u_int)ticks * psratio); } } @@ -161,6 +159,7 @@ ast(struct trapframe *framep) mtx_assert(&Giant, MA_NOTOWNED); mtx_assert(&sched_lock, MA_NOTOWNED); td->td_frame = framep; + sticks = td->td_sticks; if ((p->p_flag & P_SA) && (td->td_mailbox == NULL)) thread_user_enter(td); @@ -173,7 +172,6 @@ ast(struct trapframe *framep) * ast() will be called again. */ mtx_lock_spin(&sched_lock); - sticks = td->td_sticks; flags = td->td_flags; sflag = p->p_sflag; p->p_sflag &= ~(PS_ALRMPEND | PS_PROFPEND | PS_XCPU); |