summaryrefslogtreecommitdiffstats
path: root/sys/kern/sched_4bsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/sched_4bsd.c')
-rw-r--r--sys/kern/sched_4bsd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c
index 1a23157..be4b16a 100644
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -723,6 +723,8 @@ sched_pctcpu(struct thread *td)
struct kse *ke;
ke = td->td_kse;
+ if (ke == NULL)
+ ke = td->td_last_kse;
if (ke)
return (ke->ke_pctcpu);
OpenPOWER on IntegriCloud