spinlock for mutex, move to standard Lock interface