cherry-pick macOS OSSpinLock replacements
This popped up todaY: https://hacks.mozilla.org/2022/10/improving-firefox-responsiveness-on-macos/
These patches landed in Firefox 103:
-
Bug 1670885: Replace deprecated OSSpinLock with os_unfair_lock
- f56fb96281556e7eded0cbb884acf1531eb2049d : Fix post-fork() handlers for PHC/LogAlloc to work on macOS using unfair locks
- 8f9904bb767433e84255b3bc2324d9aadcce3dc2 : Replace deprecated NSSpinLocks with os_unfair_locks in the memory allocator
-
- 7e8fda1a8bf1a7989a6f44735ff3c3a3d1a8bc46 : Use undocumented, non-public adaptive spinlocks on macOS 10.15+, revert to user-space spinlocks on older versions
and this in 106:
-
Bug 1784018: Remove deprecated OSSpinLocks
- 44cbaf42485d18dad8864addef719c8f3707ad3f : Remove deprecated OSSpinLocks
We should see if these apply cleanly and consider cherry-picking to alpha (esr102)