Kernel: Introduce ProcessorSpecific<T> for per-CPU data structures

To add a new per-CPU data structure, add an ID for it to the
ProcessorSpecificDataID enum.

Then call ProcessorSpecific<T>::initialize() when you are ready to
construct the per-CPU data structure on the current CPU. It can then
be accessed via ProcessorSpecific<T>::get().

This patch replaces the existing hard-coded mechanisms for Scheduler
and MemoryManager per-CPU data structure.
This commit is contained in:
Andreas Kling 2021-07-27 14:30:26 +02:00
commit 1e43292c3b
Notes: sideshowbarker 2024-07-18 08:03:20 +09:00
6 changed files with 46 additions and 38 deletions

View file

@ -55,7 +55,7 @@ class RangeAllocator;
class RecursiveSpinLock;
class Region;
class Scheduler;
class SchedulerPerProcessorData;
class SchedulerData;
class SharedInodeVMObject;
class Socket;
class Space;