A minimal implementation of user-space spinlock