sanitizer_common: modernize SpinMutex
Some minor improvements: 1. Make StaticSpinMutex non-copyable. 2. Add LIKELY to Lock. 3. Move LockSlow into the .cpp file (now that we have it). 4. The only non-trivial change: use proc_yield(1) instread of proc_yield(10) with the proportional increase in the number of spin iterations. Latency of the PAUSE instruction has raised from ~1 cycle to ~100 cycles in the recent Intel CPUs. So proc_yield(10) is too aggressive backoff. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D106350
Loading
Please sign in to comment