209
208
#if defined(__APPLE__) || defined(__NetBSD__)
210
210
compute_abs_deadline(&ts, ms);
211
211
pthread_mutex_lock(&sem->lock);
214
213
rc = pthread_cond_timedwait(&sem->cond, &sem->lock, &ts);
220
218
error_exit(rc, __func__);
223
224
pthread_mutex_unlock(&sem->lock);
224
225
return (rc == ETIMEDOUT ? -1 : 0);