- The kse may be null in sched_pctcpu().

Reported by:	kris
This commit is contained in:
Jeff Roberson 2003-10-16 21:13:14 +00:00
parent 0e0f626628
commit 55f2099a70

View File

@ -723,5 +723,11 @@ sched_sizeof_thread(void)
fixpt_t
sched_pctcpu(struct thread *td)
{
return (td->td_kse->ke_pctcpu);
struct kse *ke;
ke = td->td_kse;
if (ke)
return (ke->ke_pctcpu);
return (0);
}