[vlc-devel] commit: Small simplification ( Rémi Denis-Courmont )
git version control
git at videolan.org
Mon Jul 6 22:51:22 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jul 6 23:49:46 2009 +0300| [5662f3a4e2d210ef26a29b31c181249f928bc80e] | committer: Rémi Denis-Courmont
Small simplification
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5662f3a4e2d210ef26a29b31c181249f928bc80e
---
src/misc/w32thread.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/src/misc/w32thread.c b/src/misc/w32thread.c
index 7c722c7..a696dd1 100644
--- a/src/misc/w32thread.c
+++ b/src/misc/w32thread.c
@@ -339,6 +339,7 @@ void vlc_rwlock_wrlock (vlc_rwlock_t *lock)
lock->writers++;
while ((lock->readers > 0) || (lock->writer != 0))
vlc_cond_wait (&lock->write_wait, &lock->mutex);
+ lock->writers--;
lock->writer = GetCurrentThreadId ();
vlc_mutex_unlock (&lock->mutex);
}
@@ -352,11 +353,7 @@ void vlc_rwlock_unlock (vlc_rwlock_t *lock)
if (lock->readers > 0)
lock->readers--; /* Read unlock */
else
- {
lock->writer = 0; /* Write unlock */
- assert (lock->writers > 0);
- lock->writers--;
- }
if (lock->writers > 0)
{
More information about the vlc-devel
mailing list