Semaphore implemented