semaphore example