mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:47:47 +00:00
Kernel: Add MAX_CPU_COUNT global constant
Instead of just hard-coding the x86 Processor array to size 64, we now use a named constant that you can also reference elsewhere. :^)
This commit is contained in:
parent
9b3db63e14
commit
94b514b981
2 changed files with 5 additions and 1 deletions
|
@ -61,7 +61,9 @@ struct [[gnu::aligned(64), gnu::packed]] FPUState
|
|||
class Processor;
|
||||
// Note: We only support 64 processors at most at the moment,
|
||||
// so allocate 64 slots of inline capacity in the container.
|
||||
using ProcessorContainer = Array<Processor*, 64>;
|
||||
|
||||
constexpr size_t MAX_CPU_COUNT = 64;
|
||||
using ProcessorContainer = Array<Processor*, MAX_CPU_COUNT>;
|
||||
|
||||
class Processor {
|
||||
friend class ProcessorInfo;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue