pthread_cond_timedwait implementation for Linux/SH.