support iOS(naming semaphores) and Android(unnamed semaphores)