mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:07:35 +00:00
Kernel/SMP: Don't process SMP messages in non-SMP mode
Processing SMP messages outside of non-SMP mode is a waste of time, and now that we don't rely on the side effects of calling the message processing function, let's stop calling it entirely. :^)
This commit is contained in:
parent
a971de89d3
commit
74e6a70958
2 changed files with 11 additions and 1 deletions
|
@ -205,7 +205,8 @@ public:
|
|||
ALWAYS_INLINE static void wait_check()
|
||||
{
|
||||
Processor::pause();
|
||||
Processor::current().smp_process_pending_messages();
|
||||
if (Processor::is_smp_enabled())
|
||||
Processor::current().smp_process_pending_messages();
|
||||
}
|
||||
|
||||
[[noreturn]] static void halt();
|
||||
|
@ -252,6 +253,8 @@ public:
|
|||
|
||||
ALWAYS_INLINE ProcessorInfo& info() { return *m_info; }
|
||||
|
||||
static bool is_smp_enabled();
|
||||
|
||||
ALWAYS_INLINE static Processor& current()
|
||||
{
|
||||
return *(Processor*)read_gs_ptr(__builtin_offsetof(Processor, m_self));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue