1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

Kernel: Convert Processor::in_irq() to static current_in_irq()

This closes the race window between Processor::current() and a context
switch happening before in_irq().
This commit is contained in:
Andreas Kling 2021-08-22 12:21:31 +02:00
parent 3e3f760808
commit d60635cb9d
Notes: sideshowbarker 2024-07-18 05:23:00 +09:00
14 changed files with 37 additions and 39 deletions

View file

@ -121,7 +121,7 @@ protected:
void evaluate_block_conditions()
{
if (Processor::current().in_irq()) {
if (Processor::current_in_irq()) {
// If called from an IRQ handler we need to delay evaluation
// and unblocking of waiting threads. Note that this File
// instance may be deleted until the deferred call is executed!
@ -137,7 +137,7 @@ protected:
private:
ALWAYS_INLINE void do_evaluate_block_conditions()
{
VERIFY(!Processor::current().in_irq());
VERIFY(!Processor::current_in_irq());
block_condition().unblock();
}