Spin-lock implementation