mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +00:00
Kernel: Remove a handful of unused member functions in Processor
This commit is contained in:
parent
1e43292c3b
commit
84d3428ab3
2 changed files with 0 additions and 50 deletions
|
@ -217,8 +217,6 @@ public:
|
|||
void flush_gdt();
|
||||
const DescriptorTablePointer& get_gdtr();
|
||||
|
||||
static Processor& by_id(u32 cpu);
|
||||
|
||||
static size_t processor_count() { return processors().size(); }
|
||||
|
||||
template<IteratorFunction<Processor&> Callback>
|
||||
|
@ -323,30 +321,6 @@ public:
|
|||
return Processor::id() == 0;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE u32 raise_irq()
|
||||
{
|
||||
return m_in_irq++;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE void restore_irq(u32 prev_irq)
|
||||
{
|
||||
VERIFY(prev_irq <= m_in_irq);
|
||||
if (!prev_irq) {
|
||||
u32 prev_critical = 0;
|
||||
if (m_in_critical.compare_exchange_strong(prev_critical, 1)) {
|
||||
m_in_irq = prev_irq;
|
||||
deferred_call_execute_pending();
|
||||
auto prev_raised = m_in_critical.exchange(prev_critical);
|
||||
VERIFY(prev_raised == prev_critical + 1);
|
||||
check_invoke_scheduler();
|
||||
} else if (prev_critical == 0) {
|
||||
check_invoke_scheduler();
|
||||
}
|
||||
} else {
|
||||
m_in_irq = prev_irq;
|
||||
}
|
||||
}
|
||||
|
||||
ALWAYS_INLINE u32& in_irq()
|
||||
{
|
||||
return m_in_irq;
|
||||
|
@ -416,7 +390,6 @@ public:
|
|||
static void smp_enable();
|
||||
bool smp_process_pending_messages();
|
||||
|
||||
static void smp_broadcast(Function<void()>, bool async);
|
||||
static void smp_unicast(u32 cpu, Function<void()>, bool async);
|
||||
static void smp_broadcast_flush_tlb(const PageDirectory*, VirtualAddress, size_t);
|
||||
static u32 smp_wake_n_idle_processors(u32 wake_count);
|
||||
|
|
|
@ -576,18 +576,6 @@ ProcessorContainer& Processor::processors()
|
|||
return s_processors;
|
||||
}
|
||||
|
||||
Processor& Processor::by_id(u32 cpu)
|
||||
{
|
||||
// s_processors does not need to be protected by a lock of any kind.
|
||||
// It is populated early in the boot process, and the BSP is waiting
|
||||
// for all APs to finish, after which this array never gets modified
|
||||
// again, so it's safe to not protect access to it here
|
||||
auto& procs = processors();
|
||||
VERIFY(procs[cpu] != nullptr);
|
||||
VERIFY(procs.size() > cpu);
|
||||
return *procs[cpu];
|
||||
}
|
||||
|
||||
void Processor::enter_trap(TrapFrame& trap, bool raise_irq)
|
||||
{
|
||||
VERIFY_INTERRUPTS_DISABLED();
|
||||
|
@ -922,17 +910,6 @@ void Processor::smp_broadcast_wait_sync(ProcessorMessage& msg)
|
|||
smp_return_to_pool(msg);
|
||||
}
|
||||
|
||||
void Processor::smp_broadcast(Function<void()> callback, bool async)
|
||||
{
|
||||
auto& msg = smp_get_from_pool();
|
||||
msg.async = async;
|
||||
msg.type = ProcessorMessage::Callback;
|
||||
new (msg.callback_storage) ProcessorMessage::CallbackFunction(move(callback));
|
||||
smp_broadcast_message(msg);
|
||||
if (!async)
|
||||
smp_broadcast_wait_sync(msg);
|
||||
}
|
||||
|
||||
void Processor::smp_unicast_message(u32 cpu, ProcessorMessage& msg, bool async)
|
||||
{
|
||||
auto& cur_proc = Processor::current();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue