From: RĂ©mi Denis-Courmont Date: Mon, 15 Feb 2010 20:13:47 +0000 (+0200) Subject: Win32: vlc_mutex_lock is *not* a cancellation point X-Git-Tag: 1.1.0-pre1~916 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=58e693a21c288f8d755451d76f667026389f1176;p=vlc Win32: vlc_mutex_lock is *not* a cancellation point --- diff --git a/src/win32/thread.c b/src/win32/thread.c index 08de7125c6..7c0909d1b7 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; }