[vlc-devel] commit: Win32: vlc_mutex_lock is *not* a cancellation point ( Rémi Denis-Courmont )

git version control git at videolan.org
Mon Feb 15 21:14:04 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Feb 15 22:13:47 2010 +0200| [58e693a21c288f8d755451d76f667026389f1176] | committer: Rémi Denis-Courmont 

Win32: vlc_mutex_lock is *not* a cancellation point

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

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

diff --git a/src/win32/thread.c b/src/win32/thread.c
index 08de712..7c0909d 100644
--- a/src/win32/thread.c
+++ b/src/win32/thread.c
@@ -191,6 +191,7 @@ void vlc_mutex_lock (vlc_mutex_t *p_mutex)
 {
     if (!p_mutex->dynamic)
     {   /* static mutexes */
+        int canc = vlc_savecancel ();
         assert (p_mutex != &super_mutex); /* this one cannot be static */
 
         vlc_mutex_lock (&super_mutex);
@@ -202,6 +203,7 @@ void vlc_mutex_lock (vlc_mutex_t *p_mutex)
         }
         p_mutex->locked = true;
         vlc_mutex_unlock (&super_mutex);
+        vlc_restorecancel (canc);
         return;
     }
 




More information about the vlc-devel mailing list