Simple spinlock implementation