From 5a89edc318bcf06341ca2855b743615cdfad840a Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 5 Apr 2021 12:06:58 +0200 Subject: thread_info: Fix returning last_processor thread->last_processor is a processor_t, not a slot number. * kern/thread.c (thread_info): Set sched_info->last_processor to thread->last_processor->slot_num rather than thread->last_processor. --- kern/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kern/thread.c b/kern/thread.c index 680e72c2..dfc6ff68 100644 --- a/kern/thread.c +++ b/kern/thread.c @@ -1613,7 +1613,7 @@ kern_return_t thread_info( sched_info->depress_priority = thread->depress_priority; #if NCPUS > 1 - sched_info->last_processor = thread->last_processor; + sched_info->last_processor = thread->last_processor->slot_num; #else sched_info->last_processor = 0; #endif -- cgit v1.2.3