Different implementation of spinlock.