powerpc-sf longjmp clobbering of val argument
[musl.git] / src / thread / cnd_timedwait.c
blob2802af522a50acb12721c377ddd14c7a6373d0ab
1 #include <threads.h>
2 #include <pthread.h>
3 #include <errno.h>
5 int cnd_timedwait(cnd_t *restrict c, mtx_t *restrict m, const struct timespec *restrict ts)
7 int ret = __pthread_cond_timedwait((pthread_cond_t *)c, (pthread_mutex_t *)m, ts);
8 switch (ret) {
9 /* May also return EINVAL or EPERM. */
10 default: return thrd_error;
11 case 0: return thrd_success;
12 case ETIMEDOUT: return thrd_timedout;