HomePhabricator

[darwin] switch blocking mutex from osspinlock to os_unfair_lock

Authored by aralisza on Feb 25 2021, 4:04 PM.

Description

[darwin] switch blocking mutex from osspinlock to os_unfair_lock

OSSpinLock is deprecated, so we are switching to os_unfair_lock. However, os_unfair_lock isn't available on older OSs, so we keep OSSpinLock as fallback.

Also change runtime assumption check to static since they only ever check constant values.

rdar://69588111

Reviewed By: delcypher, yln

Differential Revision: https://reviews.llvm.org/D97509