Skip to content
Snippets Groups Projects
Commit 5a6d9b05 authored by Razvan Cojocaru's avatar Razvan Cojocaru
Browse files

Bug 1786774 - Make the memory allocator spinlocks always spin in kernel-space...

Bug 1786774 - Make the memory allocator spinlocks always spin in kernel-space on macOS/AArch64. r=gsvelto

Differential Revision: https://phabricator.services.mozilla.com/D169067
parent 9d7913f7
No related branches found
No related tags found
No related merge requests found
......@@ -8,14 +8,18 @@
// static
bool Mutex::SpinInKernelSpace() {
# ifdef __aarch64__
return true;
# else
if (__builtin_available(macOS 10.15, *)) {
return true;
}
return false;
# endif
}
// static
bool Mutex::gSpinInKernelSpace = SpinInKernelSpace();
const bool Mutex::gSpinInKernelSpace = SpinInKernelSpace();
#endif // defined(XP_DARWIN)
......@@ -136,7 +136,7 @@ struct MOZ_CAPABILITY("mutex") Mutex {
#if defined(XP_DARWIN)
static bool SpinInKernelSpace();
static bool gSpinInKernelSpace;
static const bool gSpinInKernelSpace;
#endif // XP_DARWIN
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment