1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:18:11 +00: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
14 changed files with 37 additions and 39 deletions

View file

@ -135,7 +135,7 @@ void AsyncDeviceRequest::complete(RequestResult result)
VERIFY(m_result == Started);
m_result = result;
}
if (Processor::current().in_irq()) {
if (Processor::current_in_irq()) {
ref(); // Make sure we don't get freed
Processor::deferred_call_queue([this]() {
request_finished();