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:
parent
abdf24cb73
commit
992769c9d4
3 changed files with 59 additions and 50 deletions
|
@ -92,6 +92,11 @@ static inline dword cpuFlags()
|
|||
return flags;
|
||||
}
|
||||
|
||||
inline bool are_interrupts_enabled()
|
||||
{
|
||||
return cpuFlags() & 0x200;
|
||||
}
|
||||
|
||||
class InterruptDisabler {
|
||||
public:
|
||||
InterruptDisabler()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue