Added nowait argument to sem_acquire