- If a thread is not bound to a kse return 0 from sched_pctcpu().

Reported by:	 pawel.worach@nordea.com
This commit is contained in:
Jeff Roberson 2003-10-20 19:55:21 +00:00
parent b361bd542c
commit 484288de56

View File

@ -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) {