add spinlock for windows platform