diff options
author | jeff <jeff@FreeBSD.org> | 2003-10-20 19:55:21 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2003-10-20 19:55:21 +0000 |
commit | d477fdf956008182b20cd96c718f3410a088597b (patch) | |
tree | e7ecdac1f807283a2266afcc9b3152a4309e7ce5 /sys/kern | |
parent | 431652ca1fb84cfea2aafad15915d6105016d79d (diff) | |
download | FreeBSD-src-d477fdf956008182b20cd96c718f3410a088597b.zip FreeBSD-src-d477fdf956008182b20cd96c718f3410a088597b.tar.gz |
- If a thread is not bound to a kse return 0 from sched_pctcpu().
Reported by: pawel.worach@nordea.com
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/sched_ule.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 1f79439..ccd7bdd 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -1311,6 +1311,8 @@ sched_pctcpu(struct thread *td) pctcpu = 0; ke = td->td_kse; + if (ke == NULL) + return (0); mtx_lock_spin(&sched_lock); if (ke->ke_ticks) { |