Why not &quot;just&quot; fall back to a mutex after enough spinning?  I guess this would require an extra branch in the unlocking function (to check whether there are threads blocked in the kernel that need to be woken up), but that doesn&#x27;t sound too awful especially as the branch would very rarely be taken.  (It would sort of break OSSpinLock&#x27;s ABI though.  Sort of.)<p>AKA an adaptive mutex.