Spinlock code added, works