I presume when a thread acquires a lock it needs a to compare-exchange a variable indicating it had entered a critical section.
That leads me to believe implanting mutex needs support of atomic instructions like compare exchange.
Is this understanding correct?