1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 06:27:45 +00:00

Make Process::for_each...() functions inline and allocation-free.

AK::Function is very handy, but costs us an 8-byte allocation.
Let's not have kmalloc() calls in the scheduler hot path.
This commit is contained in:
Andreas Kling 2018-11-08 16:09:05 +01:00
parent abdf24cb73
commit 992769c9d4
3 changed files with 59 additions and 50 deletions

View file

@ -92,6 +92,11 @@ static inline dword cpuFlags()
return flags;
}
inline bool are_interrupts_enabled()
{
return cpuFlags() & 0x200;
}
class InterruptDisabler {
public:
InterruptDisabler()