[vlc-devel] commit: Manually reset the events ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Sep 7 19:50:43 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Sep  7 20:53:53 2008 +0300| [3746dbdc170d7e1d98f485cfb6b7af0cbf1004a2] | committer: Rémi Denis-Courmont 

Manually reset the events

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3746dbdc170d7e1d98f485cfb6b7af0cbf1004a2
---

 src/misc/threads.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/misc/threads.c b/src/misc/threads.c
index bcfcd01..13ff3cc 100644
--- a/src/misc/threads.c
+++ b/src/misc/threads.c
@@ -530,6 +530,7 @@ 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);
 
@@ -574,6 +575,7 @@ 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);
 




More information about the vlc-devel mailing list