diff options
-rw-r--r-- | kern/thread.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kern/thread.c b/kern/thread.c index dfc6ff68..903fb559 100644 --- a/kern/thread.c +++ b/kern/thread.c @@ -1613,10 +1613,11 @@ kern_return_t thread_info( sched_info->depress_priority = thread->depress_priority; #if NCPUS > 1 - sched_info->last_processor = thread->last_processor->slot_num; -#else - sched_info->last_processor = 0; + if (thread->last_processor) + sched_info->last_processor = thread->last_processor->slot_num; + else #endif + sched_info->last_processor = 0; thread_unlock(thread); splx(s); |