summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2021-04-05 12:06:58 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2021-04-05 12:06:58 +0200
commit5a89edc318bcf06341ca2855b743615cdfad840a (patch)
treef0eabea4cee1e4453dc9abd87dcd5881a96954a9
parent697d9a014506df49976251b2cc449bbe2a806d9a (diff)
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.
-rw-r--r--kern/thread.c2
1 files changed, 1 insertions, 1 deletions
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