mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:27:43 +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
|
@ -823,6 +823,11 @@ public:
|
|||
return read_fs_ptr(__builtin_offsetof(Processor, m_cpu));
|
||||
}
|
||||
|
||||
ALWAYS_INLINE static bool is_bootstrap_processor()
|
||||
{
|
||||
return Processor::id() == 0;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE u32 raise_irq()
|
||||
{
|
||||
return m_in_irq++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue