Bug 1820148 [wpt PR 38932] - [Gecko Bug 1820148] Add typing-extensions to third_party...
[gecko.git] / memory / build / Mutex.cpp
blob49f5d4e9495c389178d62bfed018b4d9685e3d31
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "Mutex.h"
7 #if defined(XP_DARWIN)
9 // static
10 bool Mutex::SpinInKernelSpace() {
11 # ifdef __aarch64__
12 return true;
13 # else
14 if (__builtin_available(macOS 10.15, *)) {
15 return true;
18 return false;
19 # endif
22 // static
23 const bool Mutex::gSpinInKernelSpace = SpinInKernelSpace();
25 #endif // defined(XP_DARWIN)