changed spinlock to work for ll and sc