diff options
author | Damien Zammit <damien@zamaudio.com> | 2023-09-24 05:29:06 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-09-24 15:21:32 +0200 |
commit | 9d78d30a34ae406620b5b25847fc17ed2b08949a (patch) | |
tree | 5ed0cb4afd2fc096655c421b676de03e1775dc1e /kern/thread.c | |
parent | 72180cd9ffa02b747d1e11d315b63d5f71436aba (diff) | |
download | gnumach-9d78d30a34ae406620b5b25847fc17ed2b08949a.tar.gz gnumach-9d78d30a34ae406620b5b25847fc17ed2b08949a.tar.bz2 gnumach-9d78d30a34ae406620b5b25847fc17ed2b08949a.zip |
percpu active_thread using gs segment
TESTED: As per previous commit
Message-Id: <20230924052824.449219-4-damien@zamaudio.com>
Diffstat (limited to 'kern/thread.c')
-rw-r--r-- | kern/thread.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kern/thread.c b/kern/thread.c index 9bbe8342..c397de84 100644 --- a/kern/thread.c +++ b/kern/thread.c @@ -69,7 +69,6 @@ #include <machine/pcb.h> #include <machine/thread.h> /* for MACHINE_STACK */ -thread_t active_threads[NCPUS]; vm_offset_t active_stacks[NCPUS]; struct kmem_cache thread_cache; @@ -2572,7 +2571,7 @@ kern_return_t processor_set_stack_usage( stack = thread->kernel_stack; for (cpu = 0; cpu < smp_get_numcpus(); cpu++) - if (active_threads[cpu] == thread) { + if (percpu_array[cpu].active_thread == thread) { stack = active_stacks[cpu]; break; } |