AK: Disable NoAllocationGuard on Lagom

Because we don't have our LibC on Lagom, the allocation guard global
flag doesn't exist and NoAllocationGuard fails to build on Lagom.
Whoops. For now, just disable NoAllocationGuard's functionality here.
This commit is contained in:
kleines Filmröllchen 2022-01-12 23:24:57 +01:00 committed by Linus Groh
parent b9093dd0ab
commit 9bf2d0b718
Notes: sideshowbarker 2024-07-17 21:00:34 +09:00

View file

@ -39,8 +39,11 @@ private:
{ {
#if defined(KERNEL) #if defined(KERNEL)
return Processor::current_thread()->get_allocation_enabled(); return Processor::current_thread()->get_allocation_enabled();
#else #elif defined(__serenity__)
// This extern thread-local lives in our LibC, which doesn't exist on other systems.
return s_allocation_enabled; return s_allocation_enabled;
#else
return true;
#endif #endif
} }
@ -48,8 +51,10 @@ private:
{ {
#if defined(KERNEL) #if defined(KERNEL)
Processor::current_thread()->set_allocation_enabled(value); Processor::current_thread()->set_allocation_enabled(value);
#else #elif defined(__serenity__)
s_allocation_enabled = value; s_allocation_enabled = value;
#else
(void)value;
#endif #endif
} }