mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:27:45 +00:00
Kernel: Add Processor::is_bootstrap_processor() function, and use it. (#6871)
The variety of checks for Processor::id() == 0 could use some assistance in the readability department. This change adds a new function to represent this check, and replaces the comparison everywhere it's used.
This commit is contained in:
parent
72a61fe137
commit
64b4e3f34b
4 changed files with 10 additions and 6 deletions
|
@ -485,7 +485,7 @@ UNMAP_AFTER_INIT APICTimer* APIC::initialize_timers(HardwareTimerBase& calibrati
|
|||
return nullptr;
|
||||
|
||||
// We should only initialize and calibrate the APIC timer once on the BSP!
|
||||
VERIFY(Processor::id() == 0);
|
||||
VERIFY(Processor::is_bootstrap_processor());
|
||||
VERIFY(!m_apic_timer);
|
||||
|
||||
m_apic_timer = APICTimer::initialize(IRQ_APIC_TIMER, calibration_timer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue