diff options
author | Emil Velikov <emil.velikov@collabora.com> | 2021-07-12 22:42:52 +0100 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2021-07-13 15:45:48 +0100 |
commit | 7966597b378bd99cbfbcf8a6b80a53952398fbf3 (patch) | |
tree | 7fc593a6b6d6b8bb5d75f35fd5e7fede47b29ddc | |
parent | c68525fff99a319686c8aa8eb5f6bfcab1a87c45 (diff) | |
download | waffle-7966597b378bd99cbfbcf8a6b80a53952398fbf3.tar.gz |
third_party/threads: initialize abs_time
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
-rw-r--r-- | third_party/threads/threads_posix.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/third_party/threads/threads_posix.c b/third_party/threads/threads_posix.c index 490f0df..bc50825 100644 --- a/third_party/threads/threads_posix.c +++ b/third_party/threads/threads_posix.c @@ -119,6 +119,8 @@ int cnd_timedwait(cnd_t *cond, mtx_t *mtx, const xtime *xt) struct timespec abs_time; int rt; if (!cond || !mtx || !xt) return thrd_error; + 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; |