On Wed, Jan 09, 2019 at 07:48:42AM -0500, Zhu Yanjun wrote: > It is a common way to use bitops to indicate the state. So replace spin > lock with bitops. Umm, the spin locks also ensure other threads have exited their critical sections, this is not an equivalent behavior if the spinlock is not removed.. Did you check is it OK? Jason