[scudo] Fine tune busy-waiting in HybridMutex

Instead of using hardware specific instruction, using simple loop over
volatile variable gives similar and more predicatable waiting time. Also
fine tune the waiting time to fit with the average time in malloc/free
operations.

Reviewed By: cferris

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

GitOrigin-RevId: cde307e4657738f1ef5f2eceaa7f896358acb3d6
2 files changed