Commit 3ee8acdb authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Win32: watch for bugs in vlc_cond_(timed)?wait

parent db3d601a
...@@ -596,6 +596,8 @@ void vlc_cond_wait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex) ...@@ -596,6 +596,8 @@ void vlc_cond_wait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex)
} }
while (result == WAIT_IO_COMPLETION); while (result == WAIT_IO_COMPLETION);
assert (result != WAIT_ABANDONED); /* another thread failed to cleanup! */
assert (result != WAIT_FAILED);
ResetEvent (*p_condvar); ResetEvent (*p_condvar);
#endif #endif
...@@ -652,6 +654,8 @@ int vlc_cond_timedwait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex, ...@@ -652,6 +654,8 @@ int vlc_cond_timedwait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex,
} }
while (result == WAIT_IO_COMPLETION); while (result == WAIT_IO_COMPLETION);
assert (result != WAIT_ABANDONED);
assert (result != WAIT_FAILED);
ResetEvent (*p_condvar); ResetEvent (*p_condvar);
return (result == WAIT_OBJECT_0) ? 0 : ETIMEDOUT; return (result == WAIT_OBJECT_0) ? 0 : ETIMEDOUT;
......
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