1 #include "pthread_impl.h"
3 static void relock(void *m)
8 int pthread_cond_timedwait(pthread_cond_t *c, pthread_mutex_t *m, const struct timespec *ts)
14 pthread_cleanup_push(relock, m);
16 if ((r=pthread_mutex_unlock(m))) return r;
19 do e = __timedwait(&c->_c_block, 1, c->_c_clock, ts, 0);
23 pthread_cleanup_pop(0);
24 if ((r=pthread_mutex_lock(m))) return r;