[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH gnumach] kern/thread: Only loop over cpus that exist
From: |
Samuel Thibault |
Subject: |
Re: [PATCH gnumach] kern/thread: Only loop over cpus that exist |
Date: |
Sun, 6 Aug 2023 15:40:37 +0200 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
applied, thanks!
Damien Zammit, le sam. 05 août 2023 15:49:08 +0000, a ecrit:
> ---
> kern/thread.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kern/thread.c b/kern/thread.c
> index a324eed7..9bbe8342 100644
> --- a/kern/thread.c
> +++ b/kern/thread.c
> @@ -57,6 +57,7 @@
> #include <kern/host.h>
> #include <kern/kalloc.h>
> #include <kern/slab.h>
> +#include <kern/smp.h>
> #include <kern/mach_clock.h>
> #include <vm/vm_kern.h>
> #include <vm/vm_user.h>
> @@ -2570,7 +2571,7 @@ kern_return_t processor_set_stack_usage(
>
> stack = thread->kernel_stack;
>
> - for (cpu = 0; cpu < NCPUS; cpu++)
> + for (cpu = 0; cpu < smp_get_numcpus(); cpu++)
> if (active_threads[cpu] == thread) {
> stack = active_stacks[cpu];
> break;
> --
> 2.40.1
>
>
>
--
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.