Added spin lock implementation