Is a spin lock a lock? What are the ways to implement it?

all the spin locks I see are implemented using CAS technology, without mutexes, and are often used for lock-free programming, so spin locks should not be locks, am I right? In addition, is there any other way to implement spin lock besides using CAS?

Menu