diff options
author | jhb <jhb@FreeBSD.org> | 2010-06-03 16:02:11 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2010-06-03 16:02:11 +0000 |
commit | 16dab63fe9c4d2fdff7ae6a70fa1a08b5c4d0c31 (patch) | |
tree | f3f1d0931865dd13209e71768070231cccfedcba /sys/kern/sched_4bsd.c | |
parent | 7c23796624ecfbb8f63cd3692eb3effb34095139 (diff) | |
download | FreeBSD-src-16dab63fe9c4d2fdff7ae6a70fa1a08b5c4d0c31.zip FreeBSD-src-16dab63fe9c4d2fdff7ae6a70fa1a08b5c4d0c31.tar.gz |
Assert that the thread lock is held in sched_pctcpu() instead of
recursively acquiring it. All of the current callers already hold the
lock.
MFC after: 1 month
Diffstat (limited to 'sys/kern/sched_4bsd.c')
-rw-r--r-- | sys/kern/sched_4bsd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index b4098c8..2cdf2c4 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -1523,6 +1523,7 @@ sched_pctcpu(struct thread *td) { struct td_sched *ts; + THREAD_LOCK_ASSERT(td, MA_OWNED); ts = td->td_sched; return (ts->ts_pctcpu); } |