Skip to content
Snippets Groups Projects
Commit d94579ea authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

Fix a bug in pthread_cond_timedwait() wrapper.

The assert() in tt_pthraed_error()
would always fail, since it was checking for e == 0, and
e could be equal to ETIMEDWAIT.
parent a3949bcc
No related branches found
No related tags found
No related merge requests found
......@@ -140,8 +140,10 @@
#define tt_pthread_cond_timedwait(cond, mutex, timeout) \
({ int e = pthread_cond_timedwait(cond, mutex, timeout);\
if (ETIMEDOUT != e) \
tt_pthread_error(e); \
if (ETIMEDOUT != e) \
say_error("%s error %d", __func__, e);\
assert(e == 0 || e == ETIMEDOUT); \
e \
})
#define tt_pthread_once(control, function) \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment