sem_trywait implementation on Linux/SH.