Commit c8031a87 authored by Jan Vesely's avatar Jan Vesely Committed by Emil Velikov

c11/threads: initialize timeout structure

Signed-off-by: default avatarJan Vesely <>
Reviewed-by: default avatarIan Romanick <>
parent 89ae41ab
......@@ -136,8 +136,14 @@ cnd_timedwait(cnd_t *cond, mtx_t *mtx, const xtime *xt)
struct timespec abs_time;
int rt;
assert(mtx != NULL);
assert(cond != NULL);
assert(xt != NULL);
abs_time.tv_sec = xt->sec;
abs_time.tv_nsec = xt->nsec;
rt = pthread_cond_timedwait(cond, mtx, &abs_time);
if (rt == ETIMEDOUT)
return thrd_busy;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment