[vlc-devel] commit: Fixed vlc_cond*wait on win32. (Laurent Aimar )
git version control
git at videolan.org
Sun Sep 7 20:56:24 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Sep 7 20:57:43 2008 +0200| [e422319dd78632bf0c1348cc79f732529d6337b9] | committer: Laurent Aimar
Fixed vlc_cond*wait on win32.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e422319dd78632bf0c1348cc79f732529d6337b9
---
src/misc/threads.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/misc/threads.c b/src/misc/threads.c
index 125e3d1..e12bef2 100644
--- a/src/misc/threads.c
+++ b/src/misc/threads.c
@@ -535,10 +535,11 @@ void vlc_cond_wait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex)
LeaveCriticalSection (&p_mutex->mutex);
result = WaitForSingleObjectEx (*p_condvar, INFINITE, TRUE);
EnterCriticalSection (&p_mutex->mutex);
- ResetEvent (*p_condvar);
}
while (result == WAIT_IO_COMPLETION);
+ ResetEvent (*p_condvar);
+
#endif
}
@@ -581,10 +582,11 @@ int vlc_cond_timedwait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex,
LeaveCriticalSection (&p_mutex->mutex);
result = WaitForSingleObjectEx (*p_condvar, delay, TRUE);
EnterCriticalSection (&p_mutex->mutex);
- ResetEvent (*p_condvar);
}
while (result == WAIT_IO_COMPLETION);
+ ResetEvent (*p_condvar);
+
return (result == WAIT_OBJECT_0) ? 0 : ETIMEDOUT;
#endif
More information about the vlc-devel
mailing list