Synchronization wait for semaphore