started spin lock based on semaphores